]> git.mxchange.org Git - simgear.git/blobdiff - simgear/scene/util/StateAttributeFactory.hxx
Merge branch 'next' of git.gitorious.org:fg/simgear into next
[simgear.git] / simgear / scene / util / StateAttributeFactory.hxx
index 9d55ebc0685467dbc55563381242b378eeea3a8c..0076fa510e6befa8f07c37edc2cadf2e6a95eeab 100644 (file)
@@ -31,6 +31,7 @@ namespace osg
 class AlphaFunc;
 class BlendFunc;
 class CullFace;
+class Depth;
 class ShadeModel;
 class Texture2D;
 class TexEnv;
@@ -56,9 +57,16 @@ public:
     osg::Texture2D* getWhiteTexture() { return _whiteTexture.get(); }
     // White color
     osg::Vec4Array* getWhiteColor() {return _white.get(); }
+    // A white, completely transparent texture
+    osg::Texture2D* getTransparentTexture()
+    {
+        return _transparentTexture.get();
+    }
     // cull front and back facing polygons
     osg::CullFace* getCullFaceFront() { return _cullFaceFront.get(); }
     osg::CullFace* getCullFaceBack() { return _cullFaceBack.get(); }
+    // Standard depth with writes disabled.
+    osg::Depth* getDepthWritesDisabled() { return _depthWritesDisabled.get(); }
     StateAttributeFactory();    
 protected:
     osg::ref_ptr<osg::AlphaFunc> _standardAlphaFunc;
@@ -67,9 +75,11 @@ protected:
     osg::ref_ptr<osg::BlendFunc> _standardBlendFunc;
     osg::ref_ptr<osg::TexEnv> _standardTexEnv;
     osg::ref_ptr<osg::Texture2D> _whiteTexture;
+    osg::ref_ptr<osg::Texture2D> _transparentTexture;
     osg::ref_ptr<osg::Vec4Array> _white;
     osg::ref_ptr<osg::CullFace> _cullFaceFront;
     osg::ref_ptr<osg::CullFace> _cullFaceBack;
+    osg::ref_ptr<osg::Depth> _depthWritesDisabled;
 };
 }
 #endif