capture NSOpenGL (Cocoa) onto a QuickTime frame
capture NSOpenGL (Cocoa) onto a QuickTime frame
- Subject: capture NSOpenGL (Cocoa) onto a QuickTime frame
- From: Seungoh Ryu <email@hidden>
- Date: Mon, 30 Apr 2001 13:43:38 -0400
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
NSBitmapImageRep *bitmap;
bitmap = [[NSBitmapImageRep alloc]
initWithFocusedViewRect:[myOpenGLView bounds]];
unsigned char *pixmap = [bitmap bitmapData];
assuming the the openGL scene is already rendered in the window.
In a code from pre-Cocoa days, I used to take the PixMapHandle of the
Gworld in which
I create my scene,
PixMapHandle pmh = GetPortPixMap(theGWorld);
LockPixels(pmh);
..... vanila QT routines (such as GetMaxCompressionSize, etc follow)
Now, how do I use the pixmap data in place of the usual pmh of the
GWorld?
Does any one know how to make this work or even a better way?
Thanks,
Seungoh Ryu