virtual void traverse(osg::NodeVisitor &nv);
void setVisibility(double vis) { visibility = vis; }
double getVisibility() const { return visibility; }
+ static void makeNewProjMat(osg::Matrixd& oldProj, double znear, double zfar,
+ osg::Matrixd& projection);
protected:
- void makeNewProjMat(osg::Matrixd& oldProj, double znear, double zfar,
- osg::Matrixd& projection);
+
typedef std::vector< osg::ref_ptr<osg::Camera> > CameraList;
CameraList cameras;
enum CameraNum {
hint->setUpdateCallback(new FGHintUpdateCallback("/sim/rendering/perspective-correction"));
stateSet->setAttribute(hint);
- // this is the topmost scenegraph node for osg
-#if 0
- mBackGroundCamera->addChild(thesky->getPreRoot());
- mBackGroundCamera->setClearMask(0);
-
- GLbitfield inheritanceMask = osg::CullSettings::ALL_VARIABLES;
- inheritanceMask &= ~osg::CullSettings::COMPUTE_NEAR_FAR_MODE;
- inheritanceMask &= ~osg::CullSettings::NEAR_FAR_RATIO;
- inheritanceMask &= ~osg::CullSettings::CULLING_MODE;
- mBackGroundCamera->setInheritanceMask(inheritanceMask);
- mBackGroundCamera->setComputeNearFarMode(osg::CullSettings::DO_NOT_COMPUTE_NEAR_FAR);
- mBackGroundCamera->setCullingMode(osg::CullSettings::NO_CULLING);
- mBackGroundCamera->setRenderOrder(osg::Camera::NESTED_RENDER);
-
- stateSet = mBackGroundCamera->getOrCreateStateSet();
- stateSet->setMode(GL_DEPTH_TEST, osg::StateAttribute::OFF);
-#endif
osg::Group* sceneGroup = new osg::Group;
sceneGroup->addChild(globals->get_scenery()->get_scene_graph());
sceneGroup->setNodeMask(~simgear::BACKGROUND_BIT);