views:

20

answers:

1

I would like to see an example of rendering with nVidia Cg to an offscreen frame buffer object.

The computers I have access to have graphic cards but no monitors (or X server). So I want to render my stuff and output them as images on the disk. The graphic cards are GTX285.

A: 

You need to create an off screen buffer and render to it the same way as you would render to a window.

See here for example (but without Cg) : http://www.mesa3d.org/brianp/sig97/offscrn.htm

Since you have a Cg shader, just enable it the same way as you would render to a window.

EDIT:

For FBO example, take a look here : http://www.songho.ca/opengl/gl_fbo.html but that is not supported by all graphical cards.

You could also render to texture, and then copy the texture to the main memory, but that is not very good (performance wise)

VJo
Since the paper was written in SIGGRAPH 97 it doesn't mention the use of Frame Buffer Object which is the solution that I am looking for.
Dat Chu