State class for managing a state stack.
Inheritance:
Public Methods
-
State()
-
virtual ~State()
-
void pushStateSet(const StateSet* dstate)
- push stateset onto state stack
-
void popStateSet()
- pop drawstate off state stack
-
void reset()
- reset the state object to an empty stack
-
inline const bool apply_mode(const StateAttribute::GLMode mode, const bool enabled)
- apply an OpenGL mode if required.
-
inline const bool apply_attribute(const StateAttribute* attribute)
- apply an attribute if required.
-
void apply(const StateSet* dstate)
- apply stateset
-
void apply()
- apply the state
-
void have_applied(const StateAttribute::GLMode mode, const StateAttribute::GLModeValue value)
- mode has been set externally, update state to reflect this setting
-
void have_applied(const StateAttribute* attribute)
- attribute has been applied externally, update state to reflect this setting
-
inline void setContextID(unsigned int contextID)
- Set the current OpenGL context uniqueID.
-
inline const unsigned int getContextID() const
- Get the current OpenGL context unique ID
-
inline void setFrameNumber(unsigned int fn)
- Set the frame number
-
inline unsigned int getFrameNumber() const
- Get the frame number
-
inline void incrementFrameNumber()
- Increment the frame number.
-
void setFineGrainedErrorDetection(const bool flag)
- Set the hint to OpenGL routines to do fine grained OpenGL error checking
-
const bool getFineGrainedErrorDetection() const
- Get the hint to OpenGL routines to do fine grained OpenGL error checking
Public Methods
-
inline Referenced& operator = (Referenced&)
-
inline void ref() const
-
inline void unref() const
-
inline const int referenceCount() const
Protected Fields
-
mutable int _refCount
Documentation
State class for managing a state stack.
Lazy state updating is used to minize state changes.
- State()
- virtual ~State()
- void pushStateSet(const StateSet* dstate)
- push stateset onto state stack
- void popStateSet()
- pop drawstate off state stack
- void reset()
- reset the state object to an empty stack
- inline const bool apply_mode(const StateAttribute::GLMode mode, const bool enabled)
- apply an OpenGL mode if required.
- inline const bool apply_attribute(const StateAttribute* attribute)
- apply an attribute if required.
- void apply(const StateSet* dstate)
- apply stateset
- void apply()
- apply the state
- void have_applied(const StateAttribute::GLMode mode, const StateAttribute::GLModeValue value)
- mode has been set externally, update state to reflect this setting
- void have_applied(const StateAttribute* attribute)
- attribute has been applied externally, update state to reflect this setting
- inline void setContextID(unsigned int contextID)
- Set the current OpenGL context uniqueID.
Note, it is the application developers responsiblity to
set up unique ID for each OpenGL context. This value is
then used by osg::StateAttribure's and osg::Drawable's to
help manage OpenGL display list and texture binds appropriate
for each context.
- inline const unsigned int getContextID() const
- Get the current OpenGL context unique ID
- inline void setFrameNumber(unsigned int fn)
- Set the frame number
- inline unsigned int getFrameNumber() const
- Get the frame number
- inline void incrementFrameNumber()
- Increment the frame number. Done once per frame.
- void setFineGrainedErrorDetection(const bool flag)
- Set the hint to OpenGL routines to do fine grained OpenGL error checking
- const bool getFineGrainedErrorDetection() const
- Get the hint to OpenGL routines to do fine grained OpenGL error checking
- ModeStack()
- bool changed
- bool last_applied_value
- ValueVec valueVec
- AttributeStack()
- bool changed
- const StateAttribute* last_applied_attribute
- AttributeVec attributeVec
- This class has no child classes.
Alphabetic index HTML hierarchy of classes or Java
This page was generated with the help of DOC++.