]> git.mxchange.org Git - flightgear.git/commitdiff
cleanup of dead code and change ViewPartitionNode::makeNewProjMat be public static
authortimoore <timoore>
Sun, 6 Jan 2008 23:03:19 +0000 (23:03 +0000)
committertimoore <timoore>
Sun, 6 Jan 2008 23:03:19 +0000 (23:03 +0000)
src/Main/ViewPartitionNode.hxx
src/Main/renderer.cxx

index 9e3d5249235000aa2e2e33e28d633af4525ac962..2e332c8e60267311aaeaa6c02544b3110941571a 100644 (file)
@@ -44,9 +44,10 @@ public:
     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 {
index ab119852d1327a9802c1f66ea1e6e5035f7cd89f..40cce615b8caace5601ef785986a6334bf7e638b 100644 (file)
@@ -491,23 +491,6 @@ FGRenderer::init( void ) {
     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);