i create a compass on the screen, but when i open an model , the HUD Compass 
disappeared .   following is my code.

can some one tell me how to resolve this problem?

//create hud camera
theCameraNode = new osg::Camera;
theCameraNode->setReferenceFrame(osg::Transform::ABSOLUTE_RF);
theCameraNode->setProjectionMatrix(osg::Matrix::ortho2D(-1,1,-1,1));
theCameraNode->setViewMatrix(osg::Matrix::identity());
theCameraNode->setViewport(0,0,200,200);
theCameraNode->setClearMask(GL_DEPTH_BUFFER_BIT);
theCameraNode->setRenderOrder(osg::CameraNode::POST_RENDER);
theCompass = new ocsCompass;      // compass node
theCameraNode->addChild(theCompass);
addChild(theCameraNode);




wh_xiexing
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to