Hi guys,
I have a question concerning the openscenegraph example "osghud". I have
a similar scene like this example except that I don't want to display
hud text. Instead I want to render some small coordinate system axes
like the ones in 3d studio max in the left bottom corner.
I still use openscenegraph 1.2, but I think this is not important for my
problem.
Now my graph looks like this: I have a sceneview with a camera, a root
node and the main scene as a child of the root node.
Now I constructed my stuff like the osghud example: I added a new camera
to the root node as a new subgraph and then I added my coordinates
system axes model as a child to that camera so that the axes and the
main scene are not connected.
I set up the viewport of that camera (2nd viewport) to the left bottom
corner with size (100,100) similar to 3d studio max. Finally, my axes
are displayed in the 2nd viewport, but not in the main scene. That is
correct so far.
Now my problem is that not only the axes but also the main scene is
displayed in the 2nd viewport. This shouldn't be like that because the
main scene is not a child of the 2nd camera.
What am I doing wrong?
These are my parameters which I set to the camera:
osg::ref_ptr<osg::Node> _axes =
osgDB::readNodeFile("../data/osg/coordinate_axes.osg");
_camera->setProjectionMatrix(osg::Matrix::perspective(50.0, 1, 0.1,
10000.0));
_camera->setViewport(0,0,100,100);
_camera->setReferenceFrame(osg::Transform::ABSOLUTE_RF);
_camera->setRenderOrder(osg::CameraNode::POST_RENDER);
_camera->setClearMask(GL_DEPTH_BUFFER_BIT);
_camera->addChild(_axes.get());
_root->addChild(_camera.get());
best regards,
Oliver
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org