IMO the most comfortable way to browse Apple's documentation is from
within Xcode, after dutifully updating to the latest revision from the
Preferences panel.
I've not read the Quick Look guide but I assume the CGContextRef you
get is your destination rendering target. In this case, you can use
CGContextDrawImage or HIViewDrawCGImage to display a CGImage that
contains your rendered frame. If you need pre/post-processing, you
might wish to pass through a CGBitmapContextRef instead: documentation
is plenty albeit not always crystal-clear.
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
On 14 May 2008, at 04:43, Heinrich Fink wrote:
Hi,
I am done with a small fast path render-engine to generate a preview
of a 3d file format written in OpenGL. I would like to use it in a
Quicklook generator
to render one frame as a static preview.
As I am still quite new to Mac-specific APIs I would to like to ask
you, if you can give me an advice which Apple APIs to use
for setting up / getting a GL context and a rendertarget (FBO or
PBuffer) as far as performance goes. The example in the Quick Look
Programming
Guide only shows how to request a CGContextRef, which does not seem
to provide a GLContext. Just pointing to the right part
of Apple documentation would already help me a lot.
Thanks,
Heinrich Fink
_______________________________________________
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/adario
%40softhome.net
This email sent to email@hidden
_______________________________________________
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