Correctly using hidden NSWindow to render offscreen OpenGL Context
Correctly using hidden NSWindow to render offscreen OpenGL Context
- Subject: Correctly using hidden NSWindow to render offscreen OpenGL Context
- From: David Nolen <email@hidden>
- Date: Mon, 28 Nov 2005 18:33:15 -0500
I'm attempting to figure out what Apple means when suggesting the
creation of a hidden window to handle offscreen opengl rendering.
I have a small app that has two NSWindows that I've instantiated in
Interface Builder. One of them is hidden. The first has a custom
NSOpenGLView attached while the second is just a standard
NSOpenGLView. From my custom NSOpenGLView object I'm using a
CoreImage context to render Core Video frames into the openGL context
of the second view, and then copying the rendered image back to the
first view's context with glReadPixels.
This only works part way, I'm getting really insane flickering in the
main window, and when I make the second window visible it's the same.
Anybody have any tips to where I've gone wrong here? Do I need to
have seperate threads for the two contexts? I wish there was Apple
documentation/example on how to accomplish this properly as it seems
like a pretty basic and useful thing to do.
David
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden