[osg-users] Rendering to a texture only

Robert Osfield robert.osfield at gmail.com
Tue Oct 16 12:35:58 PDT 2007


On 10/16/07, Williams Steven-ASW036 <Steve.Williams at motorola.com> wrote:
> Is pBuffers the only solve or can I use my current FBO code?

You need a graphics context to create a FBO.

> I currently have an FBO camera & texture running as per the osgViewer
> example, but I'm using the viewer to kick off rendering. Ideally I want
> the non-existant "rootnode->render()" then use the image attached to my
> FBO camera and remove viewer completely.

Create a pbuffer, make current on it and then a viewer setup as a
embedded view as per the osgviewersdl/glut examples then dispatch the
frames required, then cleanup.

See the osgcamera/osgwindows examples to see how to create graphics
contexts using Traits. For pbuffer just set the relevant traits
parameter.

Robert.



More information about the osg-users mailing list