* MA 02110-1301, USA.
*
*/
+#include "StateAttributeFactory.hxx"
-#include <OpenThreads/ScopedLock>
+#include <osg/AlphaFunc>
+#include <osg/Array>
+#include <osg/BlendFunc>
+#include <osg/CullFace>
+#include <osg/Depth>
+#include <osg/ShadeModel>
+#include <osg/Texture2D>
+#include <osg/TexEnv>
#include <osg/Image>
-#include "StateAttributeFactory.hxx"
using namespace osg;
_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);
}
-osg::ref_ptr<StateAttributeFactory> StateAttributeFactory::_theInstance;
-OpenThreads::Mutex StateAttributeFactory::_instanceMutex;
-
-StateAttributeFactory* StateAttributeFactory::instance()
-{
- OpenThreads::ScopedLock<OpenThreads::Mutex> lock(_instanceMutex);
- if (!_theInstance.valid()) {
- _theInstance = new StateAttributeFactory;
- }
- return _theInstance.get();
-}
}