for OneSadCookie

ObjectCreator
Unregistered
 
Post: #1
Thanks again for the Truform help. I've read a post where you talk about glReadPixels. How I can do for save a NSOpenGLView in a QuickTime picture? Thanx
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #2
I'm afraid I don't know how to write out pictures using QuickTime. It's not something I've ever wanted to do. I've got some hack code for writing .bmp screenshots from OpenGL, but it's really ugly -- I wouldn't wish it upon anybody.
Quote this message in a reply
Member
Posts: 49
Joined: 2002.05
Post: #3
This bit of code is from my engine (CEGL Engine in the dev diaries). It just reads pixels from the buffer and saves them as a TGA file which QuickTime can load. Picture Viewer doesn't seem to want to load these files. This code was in OpenGL Game Programming, but I had to change it so that all the data was converted to little endian first...

http://www.mnsi.net/~rkerr/source/openglscreenshot.cpp

All the CEGL_ variables can be changed to their respective types. CEGL_UChar for example would be unisgned char. The endian conversions can be done with a file called Endian.h that is included with CodeWarrior. Use that instead of the CEGL_Serialize methods. CEGL_Serialize simply does the appropriate endian conversion and then saves the variable to file.

If you render a screen capture out each frame you can "Open Image Sequence" in QT and create a movie out of them. Also keep in mind that the size of the buffer is fixed so you'll have to adjust it to your dimensions. Right now it's set at 1024*768*3.
Quote this message in a reply
Member
Posts: 145
Joined: 2002.06
Post: #4
Carbon_GLSnapshot @ Apple Developer Site

Sounds like it does exactly what you want.

"He who breaks a thing to find out what it is, has left the path of wisdom."
- Gandalf the Gray-Hat

Bring Alistair Cooke's America to DVD!
Quote this message in a reply
Post Reply