View Full Version : Bitmaps
12-18-2003, 04: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.
03-15-2004, 04: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?
03-15-2004, 05:31 AM
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.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.