PDA

View Full Version : Copying OpenGL workspace to Texture data in FreePascal.



firehead
07-04-2010, 07:23 PM
Hello. I was wondering how this could be done.

The command lines would be something like:

glGetImageData(100,100,200,200,TextureData);

And then when you start to draw quads, you bind texture to TextureData, then it displays the captured data when you start drawing to quad.

I wonder how this can be done.

Especially when there is a way to save the captured data to a seperate file like a BMP.

p.s. I would prefer to use the original FPC compiler, and even the IDE.

Brainer
08-04-2010, 02:15 PM
Look for code which renders a scene to a texture. :) I'm sure you'll find plenty - even for the latest OpenGL's version.