I have an external library that wants to create a frame buffer object into 
which I render something using osg, then it will do post-processing on it.  I 
have a specific camera that I want to have render into that buffer, but I 
can't seem to find any way that I can assign an externally created  frame 
buffer object to a camera.  I can hack it by having it create the buffer in a 
pre-draw callback, but if I try to do any rendering with an nested camera, 
OSG clearly can't set the state back correctly, plus I get OpenGL errors even 
if it works when it tries to set the draw and read buffers.  

I looked at the render stage, on which I can set a frame buffer object, but 
creating a renderstage for a camera is rather convoluted with the render 
stage cache on the camera, and it looks like the api doesn't really want me 
to do that.  Even if that problem is solved, I can't give the 
osg::FrameBufferObject an id to use, it wants to create its own buffer.

Is there any way I can solve this?  I would like to avoid modifying osg if I 
can.  If I can't, do you have an suggestions on how I should change it?  

I'm using OSG 2.4 ATM.

--
David Guthrie 
[EMAIL PROTECTED]
Alion Science and Technology
BMH Operation - A CMMI Maturity Level 3 Organization
5365 Robin Hood Road, Suite 100
Norfolk, VA 23513-2416
(757) 857-5670, ext 269, Fax (757) 857-6781
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to