Hi Eric, I'm afraid there are too many steps for me to follow what the final code might end looking like. Could you please just take an OSG example modify it to do what you want and send the whole code segment.
Robert. On 1/11/07, E. Wing <[EMAIL PROTECTED]> wrote:
> On 1/10/07, E. Wing <[EMAIL PROTECTED]> wrote: > > So just to see if I didn't mess anything else up and can get an image, > > should I insert a temporary camera node into the scene under the root > > node and do what I did? (And then remove the camera at the end of the > > function.) > > You could try it. > So here's the new setup code in my draw routine. osg::Camera* the_camera = new osg::Camera(*simpleViewer->getCamera()); osg::ref_ptr<osg::Node> root_node = simpleViewer->getSceneData(); simpleViewer->setSceneData(the_camera); the_camera->addChild(root_node.get()); 1) Create a new camera. I use the copy option to carry over the settings. 2) Save the old root node 3) Make the new camera the new root node. 4) Add the old root_node as a child of the new camera. 5) Do the same code I posted before to render to an image 6) Clean up by setting the old root node back to root (remove the new camera) simpleViewer->setSceneData(root_node.get()); When I run this, I can now capture an image containing the OpenGL clear color (solid blue). But I don't see the loaded model I used to have. (If I don't clean up, then my onscreen rendering also loses the loaded model and all I get is a solid blue scene.) Any last things I can try to get the model captured? Thanks, Eric _______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
_______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
