]> git.mxchange.org Git - simgear.git/blobdiff - simgear/scene/util/StateAttributeFactory.cxx
Use osg's builtin mechanisms to traverse only in range nodes with the
[simgear.git] / simgear / scene / util / StateAttributeFactory.cxx
index 43e09b9738ec569f6b41ecbd6fe5771753e88aca..6e121c073d0d7765c102bccddfc32311ccbffe5d 100644 (file)
@@ -24,6 +24,7 @@
 #include <osg/Array>
 #include <osg/BlendFunc>
 #include <osg/CullFace>
+#include <osg/Depth>
 #include <osg/ShadeModel>
 #include <osg/Texture2D>
 #include <osg/TexEnv>
@@ -70,6 +71,8 @@ StateAttributeFactory::StateAttributeFactory()
     _cullFaceFront->setDataVariance(Object::STATIC);
     _cullFaceBack = new CullFace(CullFace::BACK);
     _cullFaceBack->setDataVariance(Object::STATIC);
+    _depthWritesDisabled = new Depth(Depth::LESS, 0.0, 1.0, false);
+    _depthWritesDisabled->setDataVariance(Object::STATIC);
 }
 
 }