Hi Nitin,
Try with this code:
Code:
// create a camera to set up the projection and model view matrices, and the
subgraph to drawn in the HUD
osg::Camera* camera = new osg::Camera;
// set the projection matrix
camera-setProjectionMatrix(osg::Matrix::ortho2D(0,width,0,height));
// set the view matrix
camera-setReferenceFrame(osg::Transform::ABSOLUTE_RF);
camera-setViewMatrix(osg::Matrix::identity());
// only clear the depth buffer
camera-setClearMask(GL_DEPTH_BUFFER_BIT);
// draw subgraph after main camera view.
camera-setRenderOrder(osg::Camera::POST_RENDER);
// we don't want the camera to grab event focus from the viewers main
camera(s).
camera-setAllowEventFocus(false);
camera-addChild(mGeode);
Cheers,
Aitor
--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=27607#27607
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org