diff --git a/include/osg/CullFace b/include/osg/CullFace index 9664d96e1..03fdc6c26 100644 --- a/include/osg/CullFace +++ b/include/osg/CullFace @@ -25,7 +25,14 @@ class SG_EXPORT CullFace : public StateAttribute { public : - CullFace(); + enum Mode { + FRONT = GL_FRONT, + BACK = GL_BACK, + FRONT_AND_BACK = GL_FRONT_AND_BACK + }; + + CullFace(Mode mode=BACK): + _mode(mode) {} /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ CullFace(const CullFace& cf,const CopyOp& copyop=CopyOp::SHALLOW_COPY): @@ -52,12 +59,6 @@ class SG_EXPORT CullFace : public StateAttribute modes.push_back(GL_CULL_FACE); } - enum Mode { - FRONT = GL_FRONT, - BACK = GL_BACK, - FRONT_AND_BACK = GL_FRONT_AND_BACK - }; - inline void setMode(Mode mode) { _mode = mode; } inline Mode getMode() const { return _mode; } diff --git a/src/osg/CullFace.cpp b/src/osg/CullFace.cpp index b30465e55..f3df077ee 100644 --- a/src/osg/CullFace.cpp +++ b/src/osg/CullFace.cpp @@ -15,12 +15,6 @@ using namespace osg; -CullFace::CullFace() -{ - _mode = BACK; -} - - CullFace::~CullFace() { }