If performance is an issue, create 2 RTT stages using 2 CameraNodes.  

First render your geometry to a texture in CameraNode 1.  Second, apply
that texture to an ortho2D quad.  In this second stageRender the ortho2D
quad and your overlay stuff to another texture (cameranode2).  The
texture output of this second stage will be your desired texture.  If
these 2 FBO's are the only ones you are using, this will be extremely
fast.  If you are using more than that, see below.

The most efficient way, would be to use the same cameranode/FBO and
ping-pong the rendering to attachments instead of creating 2
cameranodes.  But, alas, I haven't figured out how to make a camera node
do that; I'm not sure it even supports that (Someone please correct me
if I'm wrong (and show me how to do it too...)).  If you need
performance and if you are going to use multiple/many FBO's in this way,
I would suggest try implementing the FBO in pure opengl in a drawable
instead of using CameraNode. (look here for some guidance
http://www.mathematik.uni-dortmund.de/~goeddeke/gpgpu/tutorial.html#feed
back2)

Dennis


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of DANIEL BASS
Sent: Wednesday, March 21, 2007 3:24 PM
To: [email protected]
Subject: [osg-users] Post-draw callback & RTT

When doing render-to-texture, the camera post-draw callback appears to
be called AFTER the rendered camera image is copied to the texture.  Is
there a way to get a callback that occurs between the completion of the
camera rendering and the copy to texture.
 That is, I want to
draw some overlay stuff on the rendered geometry before the buffer is
copied to texture.

Thanks,

--daniel
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to