render to image/texture

Hi!

I want to render to an image, let’s say 1024x1024.

Right now I use windowed mode and set the resolution
to what I want, then I render to the back buffer,
read the back buffer and write it to a file (bmp, tga, or whatever).

I use 32 bit color and the stencil buffer (for masking).

I’m wondering if there is a more convenient way of doing this
(its a bit problematic to use windowed mode since if any area
is outside the desktop, this area is disregarded during rendering).

I’ve seen some OpenGL render to texture extensions,
(like ARB_render_texture and ARB_pbuffer),
but those doesn’t seem to be widely available.
(I have a GF3 and non of them are present).

Or have I missed some other functionality in OpenGL?

I hope you understand what I mean…

Any thoughts appreciated.

Christian

Note that ARB_pbuffer is a WGL_ extension, so you have to look for it in the WGL extension string. pbuffers are widely available these days, including all GeForces and Radeons.

Thanks!

Gonna check that out imediately.

Christian