PDA

View Full Version : Off-Screen Rendering with GL or GLU?



Ice3
12-09-2003, 05:41 PM
I have a project at the moment and want to perform off-screen rendering. I can only use GL, GLU and enventually GLUT. The code must be as much as possible platform independent.

I tried to use the accum buffers but I only manage to get a black image. It seems the pipe-line doesn't render. Any idea how to initialize the GL context properly in order to do off-screen rendering?

soconne
12-10-2003, 05:04 AM
You could look into Pbuffers, or if you're video card doesn't support it, you could simply render everything in your scene without calling SwapBuffers().

When everything is drawn, you could just copy it to a texture or do whatever with it. As long as you don't call SwapBuffers after drawing, technically you are performing offscreen rendering.

Ice3
12-10-2003, 02:33 PM
pBuffer and SwapBuffer are wgl API commands. I don't have this since I have system running only with GL, GLU and to some extend GLUT.

The program must run on back-end system (Cluster PC, Beowulf, SX, etc.) So MS code will not run. http://www.opengl.org/discussion_boards/ubb/frown.gif

tarball
12-12-2003, 06:48 AM
To use the Accumulation buffer, you need to render to 'normal' buffer and then copy the rendered image to the accum buffer.

PBuffers are available on Linux but IIRC they are included as an SGI extension, you should be able to get more info from SGI's website. Although, I don't think Pbuffers can be considered platform independent yet?

Maybe you could tell us what you are trying to do?!?

nexusone
12-12-2003, 08:26 AM
You can swap buffers under glut. glutSwapBuffer (Works on any system that supports glut)

A little more about what you are trying to do would help, maybe point you in a better direction.



Originally posted by Ice3:
pBuffer and SwapBuffer are wgl API commands. I don't have this since I have system running only with GL, GLU and to some extend GLUT.

The program must run on back-end system (Cluster PC, Beowulf, SX, etc.) So MS code will not run. http://www.opengl.org/discussion_boards/ubb/frown.gif

Ice3
12-13-2003, 08:03 AM
Well I must make a pure off-screen rendering program with opengl. If hardware can be used it's a bonus but the goal is to run the application on systems that don't have a display.

My basic target is a intel XEON cluster on Red Hat 7.3 that I can access with telnet. So forget about any window to show because I cannot. The second system where I must run the application is on a SX6 machine with a Super-UX OS (basically a super vector computer) with batch queuing access (possible target: http://www.es.jamstec.go.jp/esc/eng/ES/hardware.html).

The only clean implementation I managed to run on the XEON was with Mesa and OSMesa. This is a good alternative for systems without hardware, but if I want to use a GeForce for instance on a PC it's not a good solution. I will eventually use a PC as well. I don't know if I can manage to make Mesa run on a SX machine, I know that OpenGL runs because the libraries has been compiled.

nexusone
12-13-2003, 11:28 AM
I am not sure what the point of running openGL on a system without a display?

Would it not be better to use a raytrace type engine?
Is this application being created for a render farm type application?



Originally posted by Ice3:
Well I must make a pure off-screen rendering program with opengl. If hardware can be used it's a bonus but the goal is to run the application on systems that don't have a display.

My basic target is a intel XEON cluster on Red Hat 7.3 that I can access with telnet. So forget about any window to show because I cannot. The second system where I must run the application is on a SX6 machine with a Super-UX OS (basically a super vector computer) with batch queuing access (possible target: http://www.es.jamstec.go.jp/esc/eng/ES/hardware.html).

The only clean implementation I managed to run on the XEON was with Mesa and OSMesa. This is a good alternative for systems without hardware, but if I want to use a GeForce for instance on a PC it's not a good solution. I will eventually use a PC as well. I don't know if I can manage to make Mesa run on a SX machine, I know that OpenGL runs because the libraries has been compiled.

Ice3
12-13-2003, 05:59 PM
OpenGL is a good rendering engine to produce images. Why should I spend time programming a complet rendering engine when OpenGL can do the job for me? The ultimate goal is to make a client-server program that render images on a super computer then send the image to the client. The image generation is juste a small part of what the server must perform.