]> git.mxchange.org Git - flightgear.git/commitdiff
Modified Files:
authorfrohlich <frohlich>
Sun, 28 Jan 2007 20:01:47 +0000 (20:01 +0000)
committerfrohlich <frohlich>
Sun, 28 Jan 2007 20:01:47 +0000 (20:01 +0000)
src/Main/renderer.cxx: Make it work with current osg cvs.

src/Main/renderer.cxx

index 8b3c895e76125c63ccd4323b57607b6455af89a5..2da002b30ea73fbe5f376f24c887e7f58a3e9e1a 100644 (file)
@@ -38,6 +38,7 @@
 #include <osg/CameraNode>
 #include <osg/CameraView>
 #include <osg/CullFace>
+#include <osg/ClearNode>
 #include <osg/Depth>
 #include <osg/Fog>
 #include <osg/Group>
@@ -460,7 +461,12 @@ FGRenderer::init( void ) {
     mRoot->addChild(lightSource);
 
     lightSource->addChild(mBackGroundCamera.get());
-    lightSource->addChild(mSceneCamera.get());
+//     lightSource->addChild(mSceneCamera.get());
+    // Hmm, I would think that this should be included in the camera, but ...
+    osg::ClearNode* clearNode = new osg::ClearNode;
+    clearNode->addChild(mSceneCamera.get());
+    clearNode->setClearMask(GL_DEPTH_BUFFER_BIT);
+    lightSource->addChild(clearNode);
 
 
     stateSet = globals->get_scenery()->get_scene_graph()->getOrCreateStateSet();