Added osg:State:have_applied_mode(mode) and have_applied_attribute(type) to make it

easier to specify which modes and attributes have been modified without
the user requiring to know to what value, or to have an equivilant attribute
to pass to the have_applied_attribute method.  The original have_applied(mode)
and have_applied(attribute) methods have been renamed have_applied_mode(),
have_applied_attribute() as this was required to prevent the mode and type
values colliding during compile (it was causing a compile error when the method
names were the same.)
This commit is contained in:
Robert Osfield
2002-03-21 12:00:10 +00:00
parent b53b3038eb
commit a364875afb
3 changed files with 46 additions and 6 deletions

View File

@@ -75,10 +75,23 @@ class SG_EXPORT State : public Referenced
void apply();
/** mode has been set externally, update state to reflect this setting.*/
void have_applied(const StateAttribute::GLMode mode,const StateAttribute::GLModeValue value);
void have_applied_mode(const StateAttribute::GLMode mode,const StateAttribute::GLModeValue value);
/** mode has been set externally, therefore dirty the associated mode in osg::State
* so it is applied on next call to osg::State::apply(..)*/
void have_applied_mode(const StateAttribute::GLMode mode);
/** attribute has been applied externally, update state to reflect this setting.*/
void have_applied(const StateAttribute* attribute);
void have_applied_attribute(const StateAttribute* attribute);
/** attribute has been applied externally,
* and therefore this attribute type has been dirtied
* and will need to be re-appplied on next osg::State.apply(..).
* note, if you have an osg::StateAttribute which you have applied externally
* then use the have_applied(attribute) method as this will the osg::State to
* track the current state more accuratly and enable lazy state updating such
* that only changed state will be applied.*/
void have_applied_attribute(const StateAttribute::Type type);
/** Set the current OpenGL context uniqueID.