Click to See Complete Forum and Search --> : How do I plot OpenGL into bitmap? PLEASE!


Oliver Kinne
June 16th, 1999, 08:58 AM
I'm ripping my hair out, but I don't seem to be able to plot my OpenGL graph into a bitmap. I'm trying to copy my graph into the clipboard. To get a better resolution, I create a 640x480 bitmap and try to divert OpenGL's plotting into the bitmap, but fail miserably. I know how to plot OpenGL into my CStatic-derived class and rotate it and everything, but plotting it somewhere else fails. A simple BitBlt from the screen into the bitmap and then into the clipboard works fine, but unfortunately what I plot onto the screen is too small.

Can anybody help me, please? I'm desparate.

Oliver.

F. Petitjean
June 18th, 1999, 06:23 AM
Check out GLBMP.exe example on the Microsoft site.
SoftLib/MSLFILES/GLBMP.EXE
You get an autoextractible file with an SDK project (in C) that demonstrate how to :
setup material properties in OpenGL
draw an OpenGL image into a bitmap
print an OpenGL image

Regards.

Oliver Kinne
June 18th, 1999, 07:04 AM
Thank you. I'll have a look into it.

Ta muchly,
Oliver.%

Oliver Kinne
June 18th, 1999, 07:22 AM
What is the complete URL of the example, please? I could

Josh Handley
June 18th, 1999, 11:16 AM
Also you should look at one of the posts in OpenGL section of CodeGuru:

http://codeguru.com/opengl/printpreview.shtml

This examples show drawing OpenGL into a DIB and then blitting DIB to a printer device context.

Josh

F. Petitjean
June 18th, 1999, 11:18 AM
In Microsoft Developer Network a search on GLBMP gives following URL
ftp://ftp.microsoft.com/SoftLib/MSLFILES/GLBMP.EXE
with a 33145 bytes file. The directory listing of SoftLib/MSLFILES is about 213783 bytes long.