-
screeshots
i wanna make screenshots of my program
whats the best way and how does it work with non-opengl programs?
-
Senior Member
OpenGL Guru
Re: screeshots
Hello
There is a function called glReadPixels you can use to read the pixels from a buffer. To the function you pass the coordinates of the box you want to get (in your case, the entire screen), in what format you want to obtain the data (as float, int, byte), how you want the data to be packed (RGB, RGBA...), what buffer (colorbuffer, depthbuffer...), and a pointer an array where you want the data to be placed.
Then you have to write the data to a file in a nice format.
As far as I know, this is the only way to make screenshots in OpenGL.
However, this method is not working in non-gl programs, since glReadPixels is a OpenGL function.
Bob
-
Senior Member
Regular Contributor
Re: screeshots
If you need just a few screenshots you can use in Windows the 'print'-key on your keyboard...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules