Hi,

I have an application where I setup a "normal" osgViewer view with 
setUpViewOnSingleScreen(). This works fine.

I also create an FBO camera to which I add my scene. When I want to take a 
screenshot of the application I call osgviewer->setSceneData(myFBOCamera) and 
render via osgviewer->eventTraversal() / updateTraversal() / 
renderingTraversals(). After I get the screenshot I restore my normal scene 
with osgviewer->setSceneData(mySceneData). This also works fine for taking 
screenshots.

What I want to do now is to turn off the "main" camera whilst I render the FBO 
(ie if I create a lot of screenshots for a movie I don't want to render to the 
screen). How can I turn off the main camera and render only to the FBO? 

I've tried calling osgviewer->setCamera(NULL) without sucess. Indeed when I 
meddle with the main camera I dont get a valid image from my FBO. I think this 
makes sense as the FBO is under the main camera(?). 

I also tried calling osgviewer->setCamera(myFBO) but no luck that way either. I 
also can't restore the original camera to the osgviewer.

Perhaps I am solving the problem the wrong way - is there a better method? 
Perhaps having two seperate osgViewer objects? But then I think I have only one 
conceptual "View" (my FBO always shows the same view as the main camera, it's 
only a question of if the main camera should render an image or not), so having 
one Viewer, one View and two Cameras feels correct - it's just that it doesn't 
work :-)


Thank you!

Cheers,
jake

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





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to