View Full Version : Save to file (.jpg or bmp)

03-21-2001, 04:40 AM
How can I save openGL view to the file of .jpg or bmp. I used one Dialog box for OpenGL view.
Any ideas

Tim Stirling
03-21-2001, 09:20 AM
use glReadPixels looped for the entire screen and then you can `easily` save it as a .bmp. You can use the jepeg libary to save jepegs. You could also use OpenIL (image libary)( www.openil.org (http://www.openil.org) ) which allows you to import and export almost all file types and is linked to OGL and so is nicely compatible. I think you would still have to use glReadPixels though. If you just want a screen shot press the Print Screen button (maybe also with Alt)- it should work.