Looking around I found a topic that could help but I will ask some help about 
that later.

Now, can anybody explain me please why I don't see the axes object in the 
bottom left corner of the viewer using the following code? I can see the cessna 
plane only in the viewer.

   ViewerQT* viewerWindow = new ViewerQT;
   osg::Group* root = new osg::Group;
   osg::Node* loadedModel = osgDB::readNodeFiles("cessna.osg");
   root->addChild(loadedModel);
   root->addChild(createHUD());
   viewerWindow->setCameraManipulator(new osgGA::TrackballManipulator);
   viewerWindow->setSceneData(root);
   viewerWindow->show();

osg::Camera* createHUD()
{
   osg::Camera* camera = new osg::Camera;
   camera->setProjectionMatrix(osg::Matrix::ortho2D(0,1280,0,1024));
   camera->setReferenceFrame(osg::Transform::ABSOLUTE_RF);
   camera->setViewMatrix(osg::Matrix::identity());
   camera->setClearMask(GL_DEPTH_BUFFER_BIT);
   camera->setRenderOrder(osg::Camera::POST_RENDER);
   camera->setAllowEventFocus(false);
   osg::Node* axes = osgDB::readNodeFile("axes.osg");
   camera->addChild(axes);
   return camera;
}

Regards
Gianni

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





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

Reply via email to