Re: copyCGLContextForPixelFormat
Re: copyCGLContextForPixelFormat
- Subject: Re: copyCGLContextForPixelFormat
- From: Richard Somers <email@hidden>
- Date: Sat, 2 Feb 2008 20:47:46 -0700
On Feb 2, 2008, at 4:17PM, John Harper wrote:
This method is for subclasses to override, only the CAOpenGLLayer
class should ever to call it (same for the other three similarly
named methods). The normal reason you'd want to override this is to
return a context sharing with another GL context you'd previous
created. If you override one of the -copyCGLBlah methods you should
override the related -releaseCGLBlah method to clean up whatever
objects you created.
We could have called it -retainCGLContextForPixelFormat: but that
might imply you could return the same context for multiple layers at
once. "copy" implies a lack of sharing, which is how this normally
works.
John, thanks for the reply. Perhaps you could give me some further
suggestions. I have the following view structure.
Primary opengl graphics view
Secondary opengl overlay view
Secondary quartz overlay view
I thought I would try layer-backed views to accomplish this hierarchy.
The first problem I ran into was the opengl layer-backed context. I
start with a double-buffered NSOpenGLView subclass for the primary
view. Then when I switch the view to layer-backed and the new context
is not double-buffered. I have observed this loss of opengl double-
buffering in my own code and also in Apple's LayerBackedOpenGLView
sample code.
So the next thing I thought I would try is to forgo the automatic
layer-backed context creation and try to create a layer-backed double-
buffered context manually.
Any thoughts?
Richard_______________________________________________
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