Added osg::StateSet* parameter to constructor to make it more convinient to set

up the StateSetManipulator and moved the initialization of locally cached states
into the handle method to ensure a representative version of the StateSet is captured
This commit is contained in:
Robert Osfield
2007-01-23 16:26:15 +00:00
parent 45dea96d75
commit 055abec7a3
2 changed files with 42 additions and 35 deletions

View File

@@ -33,8 +33,7 @@ class OSGGA_EXPORT StateSetManipulator : public GUIEventHandler
{
public:
StateSetManipulator();
virtual ~StateSetManipulator();
StateSetManipulator(osg::StateSet* stateset=0);
virtual const char* className() const { return "StateSetManipulator"; }
@@ -72,9 +71,11 @@ public:
protected:
// Reference pointer to a STATESTATE
osg::ref_ptr<osg::StateSet> _drawState;
virtual ~StateSetManipulator();
osg::ref_ptr<osg::StateSet> _stateset;
bool _initialized;
bool _backface;
bool _lighting;
bool _texture;