Ok it works for one view in my composite viewer. The problem was my texture. It didn't have the right size. However, I have 4 views and the render to texture only works for the first view.
I get the following message: RenderStage::runCameraSetUp(), FBO setup failed, FBO status= 0x8cd9 Is render to texture per view of a composite viewer possible? There are any experience about this? Cheers Martin -------- Original-Nachricht -------- > Datum: Tue, 15 Feb 2011 12:50:34 +0100 > Von: "Martin Großer" <grosser.mar...@gmx.de> > An: osg-users@lists.openscenegraph.org > Betreff: [osg-users] RTT and MatrixManipulator > Hello, > > I want to render my scene in a texture and after this I want to use that > texture on a Plane in the front of a ortho camera. My question is how can I > use the matrix manipulator on the rtt camera? > > Here my idea to do this, but it doesn't work. It is only a short form of > the code to show my scene graph structure. > > // Plane > plane->getOrCreateStateSet()->setTextureAttributeAndModes(0,texture,ON | > OVERRIDE); > > // RTT Camera > rtt_cam->setRenderTargetImplementation( FRAME_BUFFER_OBJECT ); > rtt_cam->attach(COLOR_BUFFER, texture, 0, 0); > > // Ortho Camera > ortho_cam->addChild(plane); > ortho_camsetReferenceFrame(::osg::Transform::ABSOLUTE_RF); > ortho_cam->setProjectionMatrixAsOrtho2D(0.0,1.0,0.0,1.0); > ortho_cam->setViewMatrix(::osg::Matrix::identity()); > ortho_cam->setRenderOrder(::osg::Camera::POST_RENDER); > > // Root Node > root->addChild(scene); > root->addChild(ortho_cam); > > // View > view->setCamera(rtt_cam); > view->setSceneData(root); > view->setCameraManipulator(trackball); > > > Any ideas? > > Thanks and best regards > > Martin > -- > Schon gehört? GMX hat einen genialen Phishing-Filter in die > Toolbar eingebaut! http://www.gmx.net/de/go/toolbar > _______________________________________________ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- GMX DSL Doppel-Flat ab 19,99 Euro/mtl.! Jetzt mit gratis Handy-Flat! http://portal.gmx.net/de/go/dsl _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org