Hi Zhangguilian, The RTT support in osg::Camera (Node) is designed to be able to cope well when the desired target implementation is not available - it uses a fallback mechanism.
RTT support has steadily improved so you may well find that things just work better in OSG-2.2. Robert. On Nov 29, 2007 3:04 PM, zhangguilian <[EMAIL PROTECTED]> wrote: > > > Hello, > I want to use Render To Texture in an algorithm of reflection, I have read > some osg1.2 examples using RTT such as: > > // set the camera to render before the main camera. > camera->setRenderOrder(osg::CameraNode::PRE_RENDER); > > // tell the camera to use OpenGL frame buffer object where > supported. > > camera->setRenderTargetImplementation(osg::CameraNode::FRAME_BUFFER_OBJECT); > > // attach the texture and use it as the color buffer. > camera->attach(osg::CameraNode::COLOR_BUFFER, texture); > > My reflection algorithm works well on the machines that support FBO,but > has no effect on the machines that cann't support FBO, > I am trying to solve this problem by replacing all the parameters of > setRenderTargetImplementation including FRAME_BUFFER, but still cann't > solve, > Is it because the frame buffer is cleared in the steps afterwards on thoes > machines that don't support FBO? > I don't know the relationship between the parameter > "osg::CameraNode::COLOR_BUFFER" of attach and the parameter > "osg::CameraNode::FRAME_BUFFER" > of setRenderTargetImplementation, and what's the relationship of these two > functions? > And I am eager to know how can I make the reflection algorithm work well on > machines without FBO, > Copy the data from framebuffer to texture(or image) > somewhere(osg::CameraNoded:: DrawCallback?)? > > Thanks very much! > ________________________________ > > zhangguilian > 2007-11-29 > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

