Hi,
I have the following (pseudo) code in a GLUT app:
osg::SceneView sceneView = new osgUtil::SceneView;
sceneView->setDefaults( osgUtil::SceneView::NO_SCENEVIEW_LIGHT |
osgUtil::SceneView::COMPILE_GLOBJECTS_AT_INIT );
osg::CameraNode camera = sceneView->getCamera();
camera->setRenderOrder(osg::CameraNode::PRE_RENDER);
... Camera setup stuff ...
osg::Texture2D texture;
... Texture setup stuff ...
camera->setRenderTargetImplementation(osg::CameraNode::FRAME_BUFFER_OBJECT);
camera->attach(osg::CameraNode::COLOR_BUFFER, texture.get());
osg::Group sceneRoot = SetupScene();
sceneView->setSceneData( sceneRoot.get() );
sceneView->init();
... Run rest of app, update, cull, draw, etc. ...
My problem is that the FBO is never created. The rendering for camera
appears to go to the back buffer. If I place this camera setup in a
"regular" OSG app using osgProducer::Viewer, then everything works fine.
Am I missing something that SceneView doesn't provide, i.e., is there
some other function or object that needs to be called to create the FBO
and setup the camera properly to use it?
Hopefully this is enough information to make sense of the problem.
Thanks for the help,
Jason
--
Jason K. Howlett
U.S. Army Aeroflightdynamics Directorate
NASA Ames Research Center Phone: 650-604-5374
Mail Stop T12B-2 Fax: 650-604-2414
Moffett Field, CA 94035-1000 mailto: [EMAIL PROTECTED]
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/