Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

dragonsimoto

OpenGL screen shot in opengl

This topic is 5970 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement
That would probably be pretty hard. I would suggest going into fullscreen mode and then just writing the whole screen color buffer into a .bmp or whatever file format you want to use. Hope this helps.

Share this post


Link to post
Share on other sites
glReadPixels(...) to dump the framebuffer to memory as an array of bytes

Write "P3 < image width > < image height > 255< newline >"
(e.g. "P3 800 600 255")

Then write out the RGB triplets for each pixel in ascii format
(max, 70 character per line)

Save that as a .PPM file

Alternatively, put P6 in the header line and spit your triplets in binary.


Edited by - Fruny on February 17, 2002 12:21:10 AM

Share this post


Link to post
Share on other sites
Did you try switching to the window and pressing Print Screen? and then going to a paint program and going edit->paste?

Share this post


Link to post
Share on other sites
d0h!

Maybe he wants to insert a function so the user can easily make screenshots, or for the programme itself to make screenshots every x minutes?



''Qui habet aures audiendi audiat'' - Me

A link to the website of my 3D engine will follow as soon as I have something concrete to show... Which will be soon.

Share this post


Link to post
Share on other sites
the print screen thing doesn''t always work - it depends on the GL implementation.

-

Geocyte Has Committed Suicide.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!