Re: capture NSOpenGL (Cocoa) onto a QuickTime frame
Re: capture NSOpenGL (Cocoa) onto a QuickTime frame
- Subject: Re: capture NSOpenGL (Cocoa) onto a QuickTime frame
- From: Andrew Platzer <email@hidden>
- Date: Mon, 30 Apr 2001 11:37:24 -0700
On Monday, April 30, 2001, at 10:43 , Seungoh Ryu wrote:
Does anyone know a good way to capture the frame from an
NSOpenGL to a QuickTime file?
From the NSOpenGL side (which is named myOpenGLView), I have
....
assuming the the openGL scene is already rendered in the window.
In general, OpenGL drawing isn't rendered to the window buffer if the
window is visible. Instead, the hardware renders it directly to the screen
on top of the wnidow. Because of this, you'll probably get a blank image
since initWithFocusedViewRect: reads the window buffer rather than the
screen.
You should use glReadPixels instead and stuff the bits into the GWorld of
your choice and use that as the source for your QT frame.
Now, how do I use the pixmap data in place of the usual pmh of the GWorld?
The pixmap from initWithFocusedViewRect: is always 8 bit. It can be either
24 or 32 bit RGBA with the alpha channel premultiplied.
Andrew
__________________________________________________________________
A n d r e w P l a t z e r
A p p l i c a t i o n F r a m e w o r k s
A p p l e