_white = new Vec4Array(1);
(*_white)[0].set(1.0f, 1.0f, 1.0f, 1.0f);
_white->setDataVariance(Object::STATIC);
+ _cullFaceFront = new CullFace(CullFace::FRONT);
+ _cullFaceFront->setDataVariance(Object::STATIC);
_cullFaceBack = new CullFace(CullFace::BACK);
_cullFaceBack->setDataVariance(Object::STATIC);
}
osg::Texture2D* getWhiteTexture() { return _whiteTexture.get(); }
// White color
osg::Vec4Array* getWhiteColor() {return _white.get(); }
- // cull back facing polygons
+ // cull front and back facing polygons
+ osg::CullFace* getCullFaceFront() { return _cullFaceFront.get(); }
osg::CullFace* getCullFaceBack() { return _cullFaceBack.get(); }
static StateAttributeFactory* instance();
osg::ref_ptr<osg::TexEnv> _standardTexEnv;
osg::ref_ptr<osg::Texture2D> _whiteTexture;
osg::ref_ptr<osg::Vec4Array> _white;
+ osg::ref_ptr<osg::CullFace> _cullFaceFront;
osg::ref_ptr<osg::CullFace> _cullFaceBack;
static osg::ref_ptr<StateAttributeFactory> _theInstance;
static OpenThreads::Mutex _instanceMutex;