From 4ec7d1553cd59fee22f5650241374b097a8fb7e4 Mon Sep 17 00:00:00 2001 From: frohlich Date: Sun, 28 Jan 2007 20:01:47 +0000 Subject: [PATCH] Modified Files: src/Main/renderer.cxx: Make it work with current osg cvs. --- src/Main/renderer.cxx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Main/renderer.cxx b/src/Main/renderer.cxx index 8b3c895e7..2da002b30 100644 --- a/src/Main/renderer.cxx +++ b/src/Main/renderer.cxx @@ -38,6 +38,7 @@ #include #include #include +#include #include #include #include @@ -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();