PDA

View Full Version : Rendering on Textures without window



01-22-2006, 12:35 PM
Hi There!

I'm currently developing an application that extracts the stomach of snakes from pictures. It just works fine up to now. I divide the stomach of the snakes into triangles and afterwards I turn them around so that the snake becomes straight. That works fine. I now use OpenGL to interpolate the texture-pixel through these triangles. But the user does not need to see that.

SInce I am just a newby to Ogl I do not know so much. My first question is, is it possible to render into a texture instead on the backbuffer and would that be possible even if I hadn't a window where I could display the results?

And my second question is: After I have rendered into the texture, how can I get the data of the texture. I want to copy the data that is stored in the texture in my own memory where I can work on the pixels to extract the stomach.

Thanks so far,
Maxi

dorbie
01-22-2006, 07:37 PM
You are looking for something like pixel buffers to allow you to render to offscreen targets.

http://oss.sgi.com/projects/ogl-sample/registry/ARB/wgl_pbuffer.txt

Scroll down on this page for a demo:

http://www.codesampler.com/oglsrc/oglsrc_7.htm