Hello Im trying to setup a RTT to a 3D texture. However i cant see any changes to the texture when i render to it. Im attaching texture3D a 4 layer 3D texture(diffrent image on each slice). This is rendered on a quad; all of this works fine. Both the quad and the texture3D are made in createModel(); which i wont paste here because it is the same as the 3D texture example.
This texture3D is rendered to by a RTT camera, the camera has no children so it should render the clear colour of bright green? (even when it has children it doesnt change the texture its rendering to), as in the code below it should make slice 1 a bright green colour if the RTT works. Unfortunatly i just get the same 4 layers i started with, the RTT doesnt change the texture. osg::Node* node =createModel(); osg::Camera* camera = new osg::Camera; camera->setClearColor(osg::Vec4(0.1f,1.0f,0.3f,1.0f)); camera->setClearMask(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // set viewport camera->setViewport(0,0,texture3D->getTextureWidth(),texture3D->getTextureHeight()); camera->setRenderTargetImplementation(osg::Camera::FRAME_BUFFER_OBJECT); camera->setRenderOrder(osg::Camera::PRE_RENDER); camera->attach (osg::Camera::COLOR_BUFFER ,texture3D,0,1,false); osg::Group*root = new osg::Group(); root->addChild(node); //camera->addChild(node); root->addChild(camera); viewer->setSceneData(root); return viewer->run(); _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

