How to print an OpenGL screen?
You haven't given much information. Do you mean print from a printer, or copy to memory, like the Print Screen key? Are you using Win32, or some other platform?
I'll assume you mean print from a printer, and you're using Win32. You need to get the colour data from the OpenGL frame buffer (use glReadPixels), then use the Win32 Printing and Print Spooler functions...
I'll assume you mean print from a printer, and you're using Win32. You need to get the colour data from the OpenGL frame buffer (use glReadPixels), then use the Win32 Printing and Print Spooler functions...
Assumming you want to print the exciting snap shot that's currently on your screen - press Print Screen key on your keyboard - start up Microsoft Paint - then paste it in (ctrl-v)
cheers
cheers
IIRC First of all use glReadBuffer to copy the screen buffer pixels into a memory buffer. Secondly, blit this buffer to a TPicture object's canvas (i think you can use putpixel). Get the TPrinter object and start printing (i think it is the Begin procedure). Blit from the picture with the opengl buffer to the TPrinter canvas and then end the print. Make sure you scale the image to fit into the paper.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement