Hi Andreas,
On 4/3/07, Andreas Goebel <[EMAIL PROTECTED]> wrote:
I´m using an osg::camera to take a screenshot in high-res. To have it as easy as possible, I just copy the original scene-View-camera. See code below. Just one problem and one question: - after taking the picture, my viewport is set to the 2500 pixels. Why is the original camera modified? Shouldn´t i use the copy-constructor here? - is there a way to figure out the maximum-resolution I can use for a screenshot?
Really not sure what is going on because your using the OSG in a bit of odd way. SceneView itself has its osg::Camera which can be accessed via SceneVIew::getCamera() & setCamera(..), whereas you are creating your own camera and assigning as a scene graph via setSceneData() - this ends up with two Camera's which could certainly lead SceneView to some confusion. The better way would be to take your RTT camera and assigned it directly to the SceneView using setCamera. This should now work in the SVN version of the OSG. Another route would be to do something like what the SVN vesion of osgdistortion does - it has a Viewer that contains a set of slave cameras, these slaves doing the RTT work. Robert. Robert. _______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
