I'm trying to add a camera to a viewer using
this code. The camera works, but if I press
's' for statistics, the application locks up.
Is this a legit way to add a second camera?
Producer::Camera *followerCamera;
Producer::Camera *mainCamera = viewer.getCamera(0);
Producer::CameraConfig *cameraConfig = viewer.getCameraConfig();
mainCamera->setShareLens(false);
followerCamera = new Producer::Camera();
followerCamera->setShareLens(false);
followerCamera->getLens()->setAutoAspect(true);
followerCamera->setRenderSurface( mainCamera->getRenderSurface());
followerCamera->setSceneHandler( mainCamera->getSceneHandler());
cameraConfig->addCamera("followerCamera",followerCamera);
Donn M
_______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
