seams there's a problem in camera setup,but you didn't give it...
There's plenty of entries in osg forum concerning RTT camera setup..
hope the further code help

Code:
        setClearMask(GL_COLOR_BUFFER_BIT);
        //      setClearMask( GL_COLOR_BUFFER_BIT);
        setClearColor(osg::Vec4(0.0f, 0, 0, 0.0f));
        setComputeNearFarMode(osg::Camera::DO_NOT_COMPUTE_NEAR_FAR);

        // set the camera to render before the main camera.
        setRenderOrder(osg::Camera::PRE_RENDER, 110);
        // tell the camera to use OpenGL frame buffer object where supported.
        setRenderTargetImplementation(osg::Camera::FRAME_BUFFER_OBJECT);
        //setReadBuffer(osg::Camera::COLOR_BUFFER);
        setProjectionResizePolicy(osg::Camera::FIXED);
        setReferenceFrame(osg::Transform::ABSOLUTE_RF);
        setViewMatrix(osg::Matrix::identity());
        
setImplicitBufferAttachmentMask(osg::Camera::IMPLICIT_COLOR_BUFFER_ATTACHMENT, 
osg::Camera::IMPLICIT_COLOR_BUFFER_ATTACHMENT);
        setAllowEventFocus(false);
        setDrawBuffer(osg::Camera::COLOR_BUFFER0);
        setViewMatrix(osg::Matrix::identity());



------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=61816#61816





_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to