View Full Version : Bitmaps
Azazel
12-18-2003, 03:57 AM
How can I render my OpenGL scene to file? I prefer to use standart Windows Bitmap. I generally use Delphi, and there is very convienient object TCanvas. I tried to use bitmap flag PFD_DRAW_TO_BITMAP, but it doesnt work. All I have done I gave TBitmap Device Context to functions wglCreateContext etc. May be I missed something important?
What about doing the copy by hand using glReadPixels ?
Then you can write the pixel array in any file format you need.
Azazel
03-15-2004, 03:12 AM
no. what if I want resolution more than is seen on the screen? why if my screen has only 256 colors and I want TrueColor? why if I even dont want to display anything?
mikael_aronsson
03-15-2004, 04:31 AM
Hi !
PFD_DRAW_TO_BITMAP works just fine, the "bitmap" must be a DIB (Device Independant Bitmap) with the correct color depth.
Make sure you don't try to use it with doublebuffering or anything like that.
Mikael
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.