Avoiding screen

Does anyone know how to create a framebuffer
without dumping its content into a screen, in
fact avoiding any involvment of monitor specs?
I just want to render a frame and save pixel
data in a file.

Thanks,
Vlad

Some platforms support rendering to offscreen buffers but it is very platform dependent, which platform are you using?

Some SGI systems support rendering to pbuffers, which are offscreen framebuffer resources.

Thanks Dorbie.

I am using PC running Red Hat linux.
Any hope?

Originally posted by dorbie:
[b]Some platforms support rendering to offscreen buffers but it is very platform dependent, which platform are you using?

Some SGI systems support rendering to pbuffers, which are offscreen framebuffer resources.[/b]

Vlad,

Pbuffers are “in the queue” for NVIDIA drivers. Both WGL and GLX varieties.

Can’t give you any specific dates, sorry.

Cass

You could render your data, then do a glReadPixels, to fetch the framebuffer, and then save the data to your desired format. You mustn’t do the call to Swap Buffers, because it will show your framebuffer in the screen. I don’t know too much about RedHat Linux, but in windows you could create a window and hide it (or rather, just don’t show it), so you don’t have a floating useless window

Originally posted by Chiguire:
You could render your data, then do a glReadPixels, to fetch the framebuffer, and then save the data to your desired format. You mustn’t do the call to Swap Buffers, because it will show your framebuffer in the screen. I don’t know too much about RedHat Linux, but in windows you could create a window and hide it (or rather, just don’t show it), so you don’t have a floating useless window

Actually I was thinking about it, unfortunately, rendering hangs up at the first “glNormal*” function and terminates with Segmentation fault.

If you are using Mesa with linux, there are special functions which can be used to write to off-screen buffers. Check out the osmesa.h header for explanations.