From: timoore Date: Sun, 6 Jan 2008 23:03:19 +0000 (+0000) Subject: cleanup of dead code and change ViewPartitionNode::makeNewProjMat be public static X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=1066c6b23ae16299c622209e165af57580fbe75c;p=flightgear.git cleanup of dead code and change ViewPartitionNode::makeNewProjMat be public static --- diff --git a/src/Main/ViewPartitionNode.hxx b/src/Main/ViewPartitionNode.hxx index 9e3d52492..2e332c8e6 100644 --- a/src/Main/ViewPartitionNode.hxx +++ b/src/Main/ViewPartitionNode.hxx @@ -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 > CameraList; CameraList cameras; enum CameraNum { diff --git a/src/Main/renderer.cxx b/src/Main/renderer.cxx index ab119852d..40cce615b 100644 --- a/src/Main/renderer.cxx +++ b/src/Main/renderer.cxx @@ -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);