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
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to