You do not need to create a window to create a hardware accelerated
offscreen rendering context. CGL alone is sufficient, since Leopard
you can create offscreen pbuffer contexts by using the
kCGLPFARemotePBuffer pixel format attribute.
This is very brittle code, but should be a good starting point.
As mentioned by others, once you have a rendered content, readback the
texture to main system memory (you want to use a PBO for that), and
then use the Core Graphics API to draw to the CGContext provided to
you by Quick Looks.
On May 14, 2008, at 12:13, Dario Accornero wrote:
The "modern" way to do offscreen rendering on OS X is with FBOs.
Sticking to strictly C APIs, you might use CreateNewWindow to obtain
a WindowRef from which a graphics port can be passed to
aglCreateContext: this will give you the actual (A)GL context in
which to draw. In this context, after making it current, you can
create an FBO from which you'll end up reading actual texels. Note
that you do not need, nor definitely want, to show the WindowRef to
which the AGL context will be attached: you only need the window to
make sure you get a hardware-rendering context.
HTH,
Dario
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Mac-opengl mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/mac-opengl/email@hidden