NSOpenGLView subclass draw issues in NSPanel
NSOpenGLView subclass draw issues in NSPanel
- Subject: NSOpenGLView subclass draw issues in NSPanel
- From: David Wilson <email@hidden>
- Date: Wed, 14 Jul 2004 18:10:49 -0400
Hi all-
I've got a custom NSOpenGLView subclass that I'm using in a utility
panel in my application where the panel may not be open at all times.
When the panel first opens, everything displays properly, all the
OpenGL calls are displayed without issue. However, if the user closes
the panel and then reopens it, the custom subclass displays as only
(properly sized) white rectangle. Doing a little bit of detective work,
I've got the following information but still no answer:
1) My subclass's custom drawRect: is not getting called when the panel
reopens, or when the panel is dragged after being reopened, despite
being called during/after drags and while the panel was open the first
time.
2) The view's superview has not changed, and the view can still be
found in its superview's list of subviews.
3) Calling setNeedsDisplay:YES on my view causes the drawRect: to be
called, but no drawing appears to happen.
4) The act of closing the window is not causing my subview to be
deallocated, and the act of reopening it is not causing a new instance
to be created.
My drawRect: function correctly sets the appropriate GL context before
all drawing, so I don't think that's the issue; I'm just at a loss as
to what might have changed between the close and the reopen that would
cause drawing to suddenly fail. Any help would be well appreciated. :)
-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.