|
Loading...
|
mac-opengl@lists.apple.com
[Prev] Thread [Next] | [Prev] Date [Next]
Re: Layer Backed NSOpenGLView and shared contexts Ariel Feinerman Wed Mar 23 22:00:52 2011
2011/3/24 Justin Greenfield <[EMAIL PROTECTED]> > Hi, > > I've got a layer backed NSOpenGLView in an app and it's giving me fits > in a couple of ways. I want a layer backed OpenGL view so that I can > host subviews and controls over my GL content. > > The first problem is that when the window switches displays, the > context is switched out from underneath me, which obliterates the > textures I was using. It seems that using a shared context to store > textures would solve this problem, but it's not clear to me how one > might accomplish this with an NSOpenGLView. NSOpenGLContext can take > a another context when its initialized, but since I'm using > NSOpenGLView I'm not explicitly creating a context. So with that, I'm > basically stuck.... > > you can use either ctx = [OpenGLContext currentContext]; or ctx = [view openGLContext]; to get current context to share it The other problem that I'm having with the layer backed OpenGL view is > reading the buffer with glReadPixels. The buffer read with > glReadPixels is not valid, so I'm not sure how we can get access to > our contents. The documentation for CALayer renderInContext: has some > cautionary warnings and OpenGLLAyers not working in 10.5 and my > experiments with it didn't bear fruit so I don't know if I'm barking > up the wrong tree or what. > > Exporting our GL content would be nice but is not absolutely > necessary. The first problem though, is serious enough to be a show > stopper. > > Any help or suggestions would be greatly appreciated! > > Thanks, > Justin > _______________________________________________ > Do not post admin requests to the list. They will be ignored. > Mac-opengl mailing list ([EMAIL PROTECTED]) > Help/Unsubscribe/Update your Subscription: > http://lists.apple.com/mailman/options/mac-opengl/arielfapple%40gmail.com > > This email sent to [EMAIL PROTECTED] > -- best regards Ariel
_______________________________________________ Do not post admin requests to the list. They will be ignored. Mac-opengl mailing list ([EMAIL PROTECTED]) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/mac-opengl/alexiscircle%40gmail.com This email sent to [EMAIL PROTECTED]
- Layer Backed NSOpenGLView and shared contexts Justin Greenfield 2011/03/23
- Re: Layer Backed NSOpenGLView and shared contexts NickMtl 2011/03/23
- Re: Layer Backed NSOpenGLView and shared contexts Ariel Feinerman 2011/03/23 <=
- Re: Layer Backed NSOpenGLView and shared contexts Justin Greenfield 2011/03/23
- Re: Layer Backed NSOpenGLView and shared contexts vade 2011/03/24
- Re: Layer Backed NSOpenGLView and shared contexts Justin Greenfield 2011/03/25
- Message not available
- Re: Layer Backed NSOpenGLView and shared contexts Ariel Feinerman 2011/03/25