PDA

View Full Version : Computing rendering in hidden window



BenSe
07-09-2008, 07:22 AM
Hello,

I am trying to record an animation from my Opengl 3D rendering code.
I save individual pictures using glReadPixels and assemble them later. My problem is that for each pictures I have to read in loads of data (astrophysical simulations) and the movie will be made of tousands of pictures: it takes hours to create. All runs smoothly if I let the Opengl window be open and more importantly on top of other windows on my screen. But since I want a 1000X1000 pixels movie, I can hardly work while the movie is being created. So my question is this,

How to force Opengl to compute the rendering in an hidden window?

I tried to use glReadBuffer(GL_BACK) but it looks like it updates the image only in the visible parts of the Opengl Window (I am on a Linux system, using X11)...

Any ideas? Or solutions?

Thanks!

-NiCo-
07-09-2008, 08:37 AM
You can render your scene to a framebuffer object (http://www.opengl.org/registry/specs/EXT/framebuffer_object.txt) which is hidden. This is probably what you're looking for since all pixels of (a renderbuffer or texture attached to) a framebuffer object pass the ownership test.

BenSe
07-09-2008, 10:20 AM
Thanks, yes to looks what like I need.

I am not sure how to use these extensions. Are they progessively implemented in newer versions of the library? Or is there a specific extension library?

Anyway, I may well be in trouble. To tell the ugly truth, I am using FORTRAN for my code, I and rely on a rather old version of OpenGL...Their are, I think, no recent fortran library for Opengl...

dletozeun
07-09-2008, 10:30 AM
opengl 1.1 is just needed for this extension.