• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSOpenGLView in NSScrollView problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSOpenGLView in NSScrollView problem


  • Subject: Re: NSOpenGLView in NSScrollView problem
  • From: David Spooner <email@hidden>
  • Date: Thu, 11 Oct 2007 06:26:08 -0600

I had previously implemented a thumbnail of opengl views, which looks similar to what you're doing. The problem is likely in how the opengl viewport is specified in your view class. It's been a while since I've looked at this and I'm not sure I've ever really understood the rationale, but I know the code I use is (effectively)

	NSRect r = [view visibleRect];
	vp[0] = 0;
	vp[1] = 0;
	vp[2] = (GLint)NSWidth(r);
	vp[3] = (GLint)NSHeight(r);

Rather than the more intuitive

	vp[0] = (GLint)NSMinX(r);
	vp[1] = (GLint)NSMinY(r);

dave


On 10-Oct-07, at 10:45 PM, Half Activist wrote:

Hi everyone,

I put several NSOpenGLView subclasses instances in a NSScrollView.
The problem is when I scroll down, the NSOpenGLView that is partly visible,
and we only see the top of it, I expect that I would see only
the top of associated opengl viewport, but it doesn't.
What is displayed is the bottom of it, it does not clip correctly.

It' kind of hard to explain so I attached a picture to depict the problem.

http://img210.imageshack.us/img210/6845/sketchts4.png
OR
http://img210.imageshack.us/my.php?image=sketchts4.png


Regards.
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Re: NSOpenPanel & NSFileTypeForHFSTypeCode
  • Next by Date: Re: setHTTPMethod: with PUT and DELETE methods
  • Previous by thread: NSOpenGLView in NSScrollView problem
  • Next by thread: THCanvasView: Finder-like Icon View
  • Index(es):
    • Date
    • Thread