Re: NSOpenGLView subclass draw issues in NSPanel
Re: NSOpenGLView subclass draw issues in NSPanel
- Subject: Re: NSOpenGLView subclass draw issues in NSPanel
- From: David Wilson <email@hidden>
- Date: Thu, 15 Jul 2004 16:08:40 -0400
On Jul 15, 2004, at 3:45 PM, Brent Gulanowski wrote:
You probably need to call -setView on the context each time the panel
is brought back. When the window is taken off-screen, something might
be disconnecting the view from the context. Off-screen windows are not
valid drawables:
(from the docs for NSOpenGLContext)
- (NSView *)view
Returns the receiver's view. Returns nil if the receiver has no
drawable or is in full-screen or offscreen mode.
Unfortunately, [context view] (where context is my NSOpenGLContext)
never returns nil, so I don't think that's the issue. Also, were that
the case, my drawRect function should be called when the panel reopens
or when it is moved, with drawing simply not appearing, but that's not
the case- for some reason, drawRect just isn't getting called at all
unless I specifically call setNeedsDisplay.
-David Wilson
email@hidden
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.