[osg-users] Rendering to a texture only

Williams Steven-ASW036 Steve.Williams at Motorola.com
Wed Oct 17 09:12:13 PDT 2007


Sorry Robert, this is still unclear. Is there one option or two you are
suggesting is possible?

	1) A viewer setup as embedded using a pbuffer context with a
normal camera
	2) A viewer setup as embedded using pbuffer context and an FBO
camera

Obviously I'd like to use an FBO, less coding than copying image buffers
around, plus I already have it working, albeit in a window.

Thanks again

-----Original Message-----
From: osg-users-bounces at lists.openscenegraph.org
[mailto:osg-users-bounces at lists.openscenegraph.org] On Behalf Of Robert
Osfield
Sent: Tuesday, October 16, 2007 2:36 PM
To: OpenSceneGraph Users
Subject: Re: Rendering to a texture only

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.
_______________________________________________
osg-users mailing list
osg-users at lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or
g



More information about the osg-users mailing list