Advertisement

screen capture in OpenGL?

Started by January 28, 2006 04:55 PM
6 comments, last by nife 18 years, 7 months ago
how can i capture the screen to an OpenGL texture?
You can use FBOs.
Here an example.
Advertisement
use an adaptation of lesson 36 to capture a screen to a texture.
But remember that on some hardware you can get some problems with textures not having a size that is not a power of two.
all i get is a hole lot of greyness :S
Took me about ten minutes to find the acursed thing but there was a thread not so long ago that had some render to texture code in it (I presume this is what you're wanting to do?), clicky.
--
Cheers,
Darren Clark
The method you see in lesson #36 is simple but by far the slowest method available as I know. FBOs are not so simple but much faster.
Advertisement
the FBO example gives this error:

EXT_framebuffer_object was not found

as for the texture mapping still the same problem, it's all grey...
GLee will solve the first of those problems for you...
Killers don't end up in jailThey end up on a high-score!

This topic is closed to new replies.

Advertisement