How can I draw WITHOUT opening a window?

So, I’m working on a molecular modeling tool that works pretty well. My problem- I want to be able to run it in a mode where it’s only output is a bitmap, with no graphics displayed. I can print out my bit map, but it always flashes a window to the screen. Can this be done? Can it be done on a machine not running X? (It has to run in linux on a machine that is not concurrently running X) I’m using GLUT to handle the windowing tasks.

Further Observations: It seems that I have to enter glutMainLoop to get any drawing commands to be written to the viewport, displayed or not And glutMainLoop automatically opens the window.

Any suggestions?

hi !!
The opengl superbible (2nd edition) contains a comlpete function to perform off-screen rendering.
I myself used it to produce bitmaps for a model analyze .

I have answered this (with code) in
the Linux forum.

Cheers