class SG_EXPORT osg::State

State class for managing a state stack.

Inheritance:


Public Methods

[more] State()
[more]virtual ~State()
[more]void pushStateSet(const StateSet* dstate)
push stateset onto state stack
[more]void popStateSet()
pop drawstate off state stack
[more]void reset()
reset the state object to an empty stack
[more]inline const bool apply_mode(const StateAttribute::GLMode mode, const bool enabled)
apply an OpenGL mode if required.
[more]inline const bool apply_attribute(const StateAttribute* attribute)
apply an attribute if required.
[more]void apply(const StateSet* dstate)
apply stateset
[more]void apply()
apply the state
[more]void have_applied(const StateAttribute::GLMode mode, const StateAttribute::GLModeValue value)
mode has been set externally, update state to reflect this setting
[more]void have_applied(const StateAttribute* attribute)
attribute has been applied externally, update state to reflect this setting
[more]inline void setContextID(unsigned int contextID)
Set the current OpenGL context uniqueID.
[more]inline const unsigned int getContextID() const
Get the current OpenGL context unique ID
[more]inline void setFrameStamp(FrameStamp* fs)
Set the frame stamp for the current frame
[more]inline const FrameStamp* getFrameStamp() const
Set the frame stamp for the current frame
[more]inline void setCamera(Camera* camera)
Set the camera.
[more]inline const Camera* getCamera() const
Get the camera
[more]void setFineGrainedErrorDetection(const bool flag)
Set the hint to OpenGL routines to do fine grained OpenGL error checking
[more]const bool getFineGrainedErrorDetection() const
Get the hint to OpenGL routines to do fine grained OpenGL error checking


Inherited from Referenced:

Public Methods

oinline Referenced& operator = (Referenced&)
oinline void ref() const
oinline void unref() const
oinline const int referenceCount() const

Protected Fields

omutable int _refCount


Documentation

State class for managing a state stack. Lazy state updating is used to minize state changes.
o State()

ovirtual ~State()

ovoid pushStateSet(const StateSet* dstate)
push stateset onto state stack

ovoid popStateSet()
pop drawstate off state stack

ovoid reset()
reset the state object to an empty stack

oinline const bool apply_mode(const StateAttribute::GLMode mode, const bool enabled)
apply an OpenGL mode if required.

oinline const bool apply_attribute(const StateAttribute* attribute)
apply an attribute if required.

ovoid apply(const StateSet* dstate)
apply stateset

ovoid apply()
apply the state

ovoid have_applied(const StateAttribute::GLMode mode, const StateAttribute::GLModeValue value)
mode has been set externally, update state to reflect this setting

ovoid have_applied(const StateAttribute* attribute)
attribute has been applied externally, update state to reflect this setting

oinline 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.

oinline const unsigned int getContextID() const
Get the current OpenGL context unique ID

oinline void setFrameStamp(FrameStamp* fs)
Set the frame stamp for the current frame

oinline const FrameStamp* getFrameStamp() const
Set the frame stamp for the current frame

oinline void setCamera(Camera* camera)
Set the camera. Note, nothing is applied, the camera is just used used in the State object to pass the current camera to Drawables during rendering.

oinline const Camera* getCamera() const
Get the camera

ovoid setFineGrainedErrorDetection(const bool flag)
Set the hint to OpenGL routines to do fine grained OpenGL error checking

oconst bool getFineGrainedErrorDetection() const
Get the hint to OpenGL routines to do fine grained OpenGL error checking

o ModeStack()

obool changed

obool last_applied_value

oValueVec valueVec

o AttributeStack()

obool changed

oconst StateAttribute* last_applied_attribute

oAttributeVec attributeVec


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.