开发者

Example for rendering with Cg to a offscreen frame buffer object

开发者 https://www.devze.com 2023-01-21 04:54 出处:网络
I would like to see an example of rendering with nVidia Cg to an offscreen frame buffer object. T开发者_开发问答he computers I have access to have graphic cards but no monitors (or X server). So I wa

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

T开发者_开发问答he 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.


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)

0

精彩评论

暂无评论...
验证码 换一张
取 消