OpenSceneGraph
3.0.1
|
Encapsulates the current applied OpenGL modes, attributes and vertex arrays settings, implements lazy state updating and provides accessors for querying the current state. More...
Classes | |
struct | AttributeStack |
struct | DynamicObjectRenderingCompletedCallback |
struct | EnabledArrayPair |
struct | ModeStack |
struct | UniformStack |
Public Types | |
enum | CheckForGLErrors { NEVER_CHECK_GL_ERRORS, ONCE_PER_FRAME, ONCE_PER_ATTRIBUTE } |
typedef std::vector< const StateSet * > | StateSetStack |
typedef std::vector < VertexAttribAlias > | VertexAttribAliasList |
typedef std::vector< GLushort > | IndicesGLushort |
typedef std::vector< GLuint > | IndicesGLuint |
typedef std::pair< const StateAttribute *, StateAttribute::OverrideValue > | AttributePair |
typedef std::vector < AttributePair > | AttributeVec |
Public Member Functions | |
State () | |
void | setGraphicsContext (GraphicsContext *context) |
Set the graphics context associated with that owns this State object. | |
GraphicsContext * | getGraphicsContext () |
Get the graphics context associated with that owns this State object. | |
const GraphicsContext * | getGraphicsContext () const |
Get the const graphics context associated with that owns this State object. | |
void | setContextID (unsigned int contextID) |
Set the current OpenGL context uniqueID. | |
unsigned int | getContextID () const |
Get the current OpenGL context unique ID. | |
void | setShaderCompositionEnabled (bool flag) |
bool | getShaderCompositionEnabled () const |
void | setShaderComposer (ShaderComposer *sc) |
Set the ShaderComposor object that implements shader composition. | |
ShaderComposer * | getShaderComposer () |
Get the ShaderComposor object. | |
const ShaderComposer * | getShaderComposer () const |
Get the const ShaderComposor object. | |
StateSet::UniformList & | getCurrentShaderCompositionUniformList () |
Get the unform list in which to inject any uniforms that StateAttribute::apply(State&) methods provide. | |
void | applyShaderCompositionUniform (const osg::Uniform *uniform, StateAttribute::OverrideValue value=StateAttribute::ON) |
Convinience method for StateAttribute:::apply(State&) methods to pass on their uniforms to osg::State so it can apply them at the appropriate point. | |
void | pushStateSet (const StateSet *dstate) |
Push stateset onto state stack. | |
void | popStateSet () |
Pop stateset off state stack. | |
void | popAllStateSets () |
pop all statesets off state stack, ensuring it is empty ready for the next frame. | |
void | insertStateSet (unsigned int pos, const StateSet *dstate) |
Insert stateset onto state stack. | |
void | removeStateSet (unsigned int pos) |
Pop stateset off state stack. | |
unsigned int | getStateSetStackSize () |
Get the number of StateSet's on the StateSet stack. | |
void | popStateSetStackToSize (unsigned int size) |
Pop StateSet's for the StateSet stack till its size equals the specified size. | |
StateSetStack & | getStateSetStack () |
Get the StateSet stack. | |
void | captureCurrentState (StateSet &stateset) const |
Copy the modes and attributes which capture the current state. | |
void | reset () |
reset the state object to an empty stack. | |
const Viewport * | getCurrentViewport () const |
void | setInitialViewMatrix (const osg::RefMatrix *matrix) |
const osg::Matrix & | getInitialViewMatrix () const |
const osg::Matrix & | getInitialInverseViewMatrix () const |
void | applyProjectionMatrix (const osg::RefMatrix *matrix) |
const osg::Matrix & | getProjectionMatrix () const |
void | applyModelViewMatrix (const osg::RefMatrix *matrix) |
void | applyModelViewMatrix (const osg::Matrix &) |
const osg::Matrix & | getModelViewMatrix () const |
void | setUseModelViewAndProjectionUniforms (bool flag) |
bool | getUseModelViewAndProjectionUniforms () const |
void | updateModelViewAndProjectionMatrixUniforms () |
void | applyModelViewAndProjectionUniformsIfRequired () |
osg::Uniform * | getModelViewMatrixUniform () |
osg::Uniform * | getProjectionMatrixUniform () |
osg::Uniform * | getModelViewProjectionMatrixUniform () |
osg::Uniform * | getNormalMatrixUniform () |
Polytope | getViewFrustum () const |
void | setUseVertexAttributeAliasing (bool flag) |
bool | getUseVertexAttributeAliasing () const |
const VertexAttribAlias & | getVertexAlias () |
const VertexAttribAlias & | getNormalAlias () |
const VertexAttribAlias & | getColorAlias () |
const VertexAttribAlias & | getSecondaryColorAlias () |
const VertexAttribAlias & | getFogCoordAlias () |
const VertexAttribAliasList & | getTexCoordAliasList () |
const Program::AttribBindingList & | getAttributeBindingList () |
bool | convertVertexShaderSourceToOsgBuiltIns (std::string &source) const |
void | apply (const StateSet *dstate) |
Apply stateset. | |
void | apply () |
Updates the OpenGL state so that it matches the StateSet at the top of the stack of StateSet s maintained internally by a State . | |
void | applyShaderComposition () |
Apply any shader composed state. | |
void | setModeValidity (StateAttribute::GLMode mode, bool valid) |
Set whether a particular OpenGL mode is valid in the current graphics context. | |
bool | getModeValidity (StateAttribute::GLMode mode) |
Get whether a particular OpenGL mode is valid in the current graphics context. | |
void | setGlobalDefaultModeValue (StateAttribute::GLMode mode, bool enabled) |
bool | getGlobalDefaultModeValue (StateAttribute::GLMode mode) |
bool | applyMode (StateAttribute::GLMode mode, bool enabled) |
Apply an OpenGL mode if required. | |
void | setGlobalDefaultTextureModeValue (unsigned int unit, StateAttribute::GLMode mode, bool enabled) |
bool | getGlobalDefaultTextureModeValue (unsigned int unit, StateAttribute::GLMode mode) |
bool | applyTextureMode (unsigned int unit, StateAttribute::GLMode mode, bool enabled) |
void | setGlobalDefaultAttribute (const StateAttribute *attribute) |
const StateAttribute * | getGlobalDefaultAttribute (StateAttribute::Type type, unsigned int member=0) |
bool | applyAttribute (const StateAttribute *attribute) |
Apply an attribute if required. | |
void | setGlobalDefaultTextureAttribute (unsigned int unit, const StateAttribute *attribute) |
const StateAttribute * | getGlobalDefaultTextureAttribute (unsigned int unit, StateAttribute::Type type, unsigned int member=0) |
bool | applyTextureAttribute (unsigned int unit, const StateAttribute *attribute) |
void | haveAppliedMode (StateAttribute::GLMode mode, StateAttribute::GLModeValue value) |
Mode has been set externally, update state to reflect this setting. | |
void | haveAppliedMode (StateAttribute::GLMode mode) |
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 | haveAppliedAttribute (const StateAttribute *attribute) |
Attribute has been applied externally, update state to reflect this setting. | |
void | haveAppliedAttribute (StateAttribute::Type type, unsigned int member=0) |
Attribute has been applied externally, and therefore this attribute type has been dirtied and will need to be re-applied on next osg::State.apply(..). | |
bool | getLastAppliedMode (StateAttribute::GLMode mode) const |
Get whether the current specified mode is enabled (true) or disabled (false). | |
const StateAttribute * | getLastAppliedAttribute (StateAttribute::Type type, unsigned int member=0) const |
Get the current specified attribute, return NULL if one has not yet been applied. | |
void | haveAppliedTextureMode (unsigned int unit, StateAttribute::GLMode mode, StateAttribute::GLModeValue value) |
texture Mode has been set externally, update state to reflect this setting. | |
void | haveAppliedTextureMode (unsigned int unit, StateAttribute::GLMode mode) |
texture 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 | haveAppliedTextureAttribute (unsigned int unit, const StateAttribute *attribute) |
texture Attribute has been applied externally, update state to reflect this setting. | |
void | haveAppliedTextureAttribute (unsigned int unit, StateAttribute::Type type, unsigned int member=0) |
texture Attribute has been applied externally, and therefore this attribute type has been dirtied and will need to be re-applied on next osg::State.apply(..). | |
bool | getLastAppliedTextureMode (unsigned int unit, StateAttribute::GLMode mode) const |
Get whether the current specified texture mode is enabled (true) or disabled (false). | |
const StateAttribute * | getLastAppliedTextureAttribute (unsigned int unit, StateAttribute::Type type, unsigned int member=0) const |
Get the current specified texture attribute, return NULL if one has not yet been applied. | |
void | dirtyAllModes () |
Dirty the modes previously applied in osg::State. | |
void | dirtyAllAttributes () |
Dirty the modes attributes previously applied in osg::State. | |
void | disableAllVertexArrays () |
disable the vertex, normal, color, tex coords, secondary color, fog coord and index arrays. | |
void | dirtyAllVertexArrays () |
dirty the vertex, normal, color, tex coords, secondary color, fog coord and index arrays. | |
void | setCurrentVertexBufferObject (osg::GLBufferObject *vbo) |
const GLBufferObject * | getCurrentVertexBufferObject () |
void | bindVertexBufferObject (osg::GLBufferObject *vbo) |
void | unbindVertexBufferObject () |
void | setCurrentElementBufferObject (osg::GLBufferObject *ebo) |
const GLBufferObject * | getCurrentElementBufferObject () |
void | bindElementBufferObject (osg::GLBufferObject *ebo) |
void | unbindElementBufferObject () |
void | setCurrentPixelBufferObject (osg::GLBufferObject *pbo) |
const GLBufferObject * | getCurrentPixelBufferObject () |
void | bindPixelBufferObject (osg::GLBufferObject *pbo) |
void | unbindPixelBufferObject () |
void | drawQuads (GLint first, GLsizei count, GLsizei primCount=0) |
void | glDrawArraysInstanced (GLenum mode, GLint first, GLsizei count, GLsizei primcount) |
void | glDrawElementsInstanced (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount) |
void | Vertex (float x, float y, float z, float w=1.0f) |
void | Color (float r, float g, float b, float a=1.0f) |
void | Normal (float x, float y, float z) |
void | TexCoord (float x, float y=0.0f, float z=0.0f, float w=1.0f) |
void | MultiTexCoord (unsigned int unit, float x, float y=0.0f, float z=0.0f, float w=1.0f) |
void | VerteAttrib (unsigned int location, float x, float y=0.0f, float z=0.0f, float w=0.0f) |
void | lazyDisablingOfVertexAttributes () |
Mark all the vertex attributes as being disabled but leave the disabling till a later call to applyDisablingOfVertexAttributes. | |
void | applyDisablingOfVertexAttributes () |
Disable all the vertex attributes that have been marked as to be disabled. | |
void | setInterleavedArrays (GLenum format, GLsizei stride, const GLvoid *pointer) |
Wrapper around glInterleavedArrays(..). | |
void | setVertexPointer (const Array *array) |
Set the vertex pointer using an osg::Array, and manage any VBO that are required. | |
void | setVertexPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *ptr) |
wrapper around glEnableClientState(GL_VERTEX_ARRAY);glVertexPointer(..); note, only updates values that change. | |
void | disableVertexPointer () |
wrapper around glDisableClientState(GL_VERTEX_ARRAY). | |
void | dirtyVertexPointer () |
void | setNormalPointer (const Array *array) |
Set the normal pointer using an osg::Array, and manage any VBO that are required. | |
void | setNormalPointer (GLenum type, GLsizei stride, const GLvoid *ptr) |
wrapper around glEnableClientState(GL_NORMAL_ARRAY);glNormalPointer(..); note, only updates values that change. | |
void | disableNormalPointer () |
wrapper around glDisableClientState(GL_NORMAL_ARRAY); note, only updates values that change. | |
void | dirtyNormalPointer () |
void | setColorPointer (const Array *array) |
Set the color pointer using an osg::Array, and manage any VBO that are required. | |
void | setColorPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *ptr) |
wrapper around glEnableClientState(GL_COLOR_ARRAY);glColorPointer(..); note, only updates values that change. | |
void | disableColorPointer () |
wrapper around glDisableClientState(GL_COLOR_ARRAY); note, only updates values that change. | |
void | dirtyColorPointer () |
bool | isSecondaryColorSupported () const |
void | setSecondaryColorPointer (const Array *array) |
Set the secondary color pointer using an osg::Array, and manage any VBO that are required. | |
void | setSecondaryColorPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *ptr) |
wrapper around glEnableClientState(GL_SECONDARY_COLOR_ARRAY);glSecondayColorPointer(..); note, only updates values that change. | |
void | disableSecondaryColorPointer () |
wrapper around glDisableClientState(GL_SECONDARY_COLOR_ARRAY); note, only updates values that change. | |
void | dirtySecondaryColorPointer () |
bool | isFogCoordSupported () const |
void | setFogCoordPointer (const Array *array) |
Set the fog coord pointer using an osg::Array, and manage any VBO that are required. | |
void | setFogCoordPointer (GLenum type, GLsizei stride, const GLvoid *ptr) |
wrapper around glEnableClientState(GL_FOG_COORDINATE_ARRAY);glFogCoordPointer(..); note, only updates values that change. | |
void | disableFogCoordPointer () |
wrapper around glDisableClientState(GL_FOG_COORDINATE_ARRAY); note, only updates values that change. | |
void | dirtyFogCoordPointer () |
void | setTexCoordPointer (unsigned int unit, const Array *array) |
Set the tex coord pointer using an osg::Array, and manage any VBO that are required. | |
void | setTexCoordPointer (unsigned int unit, GLint size, GLenum type, GLsizei stride, const GLvoid *ptr) |
wrapper around glEnableClientState(GL_TEXTURE_COORD_ARRAY);glTexCoordPointer(..); note, only updates values that change. | |
void | disableTexCoordPointer (unsigned int unit) |
wrapper around glDisableClientState(GL_TEXTURE_COORD_ARRAY); note, only updates values that change. | |
void | dirtyTexCoordPointer (unsigned int unit) |
void | disableTexCoordPointersAboveAndIncluding (unsigned int unit) |
void | dirtyTexCoordPointersAboveAndIncluding (unsigned int unit) |
bool | setActiveTextureUnit (unsigned int unit) |
Set the current texture unit, return true if selected, false if selection failed such as when multi texturing is not supported. | |
unsigned int | getActiveTextureUnit () const |
Get the current texture unit. | |
bool | setClientActiveTextureUnit (unsigned int unit) |
Set the current tex coord array texture unit, return true if selected, false if selection failed such as when multi texturing is not supported. | |
unsigned int | getClientActiveTextureUnit () const |
Get the current tex coord array texture unit. | |
void | setVertexAttribPointer (unsigned int unit, const Array *array, GLboolean normalized) |
Set the vertex attrib pointer using an osg::Array, and manage any VBO that are required. | |
void | setVertexAttribPointer (unsigned int index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *ptr) |
wrapper around glEnableVertexAttribArrayARB(index);glVertexAttribPointerARB(..); note, only updates values that change. | |
void | disableVertexAttribPointer (unsigned int index) |
wrapper around DisableVertexAttribArrayARB(index); note, only updates values that change. | |
void | disableVertexAttribPointersAboveAndIncluding (unsigned int index) |
void | dirtyVertexAttribPointer (unsigned int index) |
void | dirtyVertexAttribPointersAboveAndIncluding (unsigned int index) |
bool | isVertexBufferObjectSupported () const |
void | setLastAppliedProgramObject (const Program::PerContextProgram *program) |
const Program::PerContextProgram * | getLastAppliedProgramObject () const |
GLint | getUniformLocation (unsigned int uniformNameID) const |
GLint | getUniformLocation (const std::string &uniformName) const |
Alternative version of getUniformLocation( unsigned int uniformNameID ) retrofited into OSG for backward compatibility with osgCal, after uniform ids were refactored from std::strings to GLints in OSG version 2.9.10. | |
GLint | getAttribLocation (const std::string &name) const |
AttributeVec & | getAttributeVec (const osg::StateAttribute *attribute) |
void | setFrameStamp (FrameStamp *fs) |
Set the frame stamp for the current frame. | |
FrameStamp * | getFrameStamp () |
Get the frame stamp for the current frame. | |
const FrameStamp * | getFrameStamp () const |
Get the const frame stamp for the current frame. | |
void | setDisplaySettings (DisplaySettings *vs) |
Set the DisplaySettings. | |
const DisplaySettings * | getDisplaySettings () const |
Get the DisplaySettings. | |
void | setAbortRenderingPtr (bool *abortPtr) |
Set flag for early termination of the draw traversal. | |
bool | getAbortRendering () const |
Get flag for early termination of the draw traversal, if true steps should be taken to complete rendering early. | |
void | setDynamicObjectRenderingCompletedCallback (DynamicObjectRenderingCompletedCallback *cb) |
Set the callback to be called when the dynamic object count hits 0. | |
DynamicObjectRenderingCompletedCallback * | getDynamicObjectRenderingCompletedCallback () |
Get the callback to be called when the dynamic object count hits 0. | |
void | setDynamicObjectCount (unsigned int count, bool callCallbackOnZero=false) |
Set the number of dynamic objects that will be rendered in this graphics context this frame. | |
unsigned int | getDynamicObjectCount () const |
Get the number of dynamic objects that will be rendered in this graphics context this frame. | |
void | decrementDynamicObjectCount () |
Decrement the number of dynamic objects left to render this frame, and once the count goes to zero call the DynamicObjectRenderingCompletedCallback to inform of completion. | |
void | setMaxTexturePoolSize (unsigned int size) |
unsigned int | getMaxTexturePoolSize () const |
void | setMaxBufferObjectPoolSize (unsigned int size) |
unsigned int | getMaxBufferObjectPoolSize () const |
void | setCheckForGLErrors (CheckForGLErrors check) |
Set whether and how often OpenGL errors should be checked for. | |
CheckForGLErrors | getCheckForGLErrors () const |
Get whether and how often OpenGL errors should be checked for. | |
bool | checkGLErrors (const char *str) const |
bool | checkGLErrors (StateAttribute::GLMode mode) const |
bool | checkGLErrors (const StateAttribute *attribute) const |
void | print (std::ostream &fout) const |
print out the internal details of osg::State - useful for debugging. | |
void | initializeExtensionProcs () |
Initialize extension used by osg:::State. | |
virtual void | objectDeleted (void *object) |
objectDeleted is called when the observed object is about to be deleted. | |
GLBeginEndAdapter & | getGLBeginEndAdapter () |
Get the GL adapter object used to map OpenGL 1.0 glBegin/glEnd usage to vertex arrays. | |
ArrayDispatchers & | getArrayDispatchers () |
Get the helper class for dispatching osg::Arrays as OpenGL attribute data. | |
void | setGraphicsCostEstimator (GraphicsCostEstimator *gce) |
Set the helper class that provides applications with estimate on how much different graphics operations will cost. | |
GraphicsCostEstimator * | getGraphicsCostEstimator () |
Get the helper class that provides applications with estimate on how much different graphics operations will cost. | |
const GraphicsCostEstimator * | getGraphicsCostEstimator () const |
Get the cont helper class that provides applications with estimate on how much different graphics operations will cost. | |
Timer_t | getStartTick () const |
Support for synchronizing the system time and the timestamp counter available with ARB_timer_query. | |
void | setStartTick (Timer_t tick) |
Timer_t | getGpuTick () const |
double | getGpuTime () const |
GLuint64EXT | getGpuTimestamp () const |
void | setGpuTimestamp (Timer_t tick, GLuint64EXT timestamp) |
int | getTimestampBits () const |
void | setTimestampBits (int bits) |
virtual void | frameCompleted () |
called by the GraphicsContext just before GraphicsContext::swapBuffersImplementation(). | |
Public Attributes | |
IndicesGLushort | _quadIndicesGLushort [4] |
IndicesGLuint | _quadIndicesGLuint [4] |
Protected Types | |
typedef std::map < StateAttribute::GLMode, ModeStack > | ModeMap |
typedef std::vector< ModeMap > | TextureModeMapList |
typedef std::map < StateAttribute::TypeMemberPair, AttributeStack > | AttributeMap |
typedef std::vector< AttributeMap > | TextureAttributeMapList |
typedef std::map< std::string, UniformStack > | UniformMap |
typedef std::vector< ref_ptr < const Matrix > > | MatrixStack |
typedef std::set< const Program::PerContextProgram * > | AppliedProgramObjectSet |
typedef std::vector < EnabledArrayPair > | EnabledTexCoordArrayList |
typedef std::vector < EnabledArrayPair > | EnabledVertexAttribArrayList |
typedef GLsizei | stride |
typedef GLsizei const GLvoid * | pointer |
typedef GLenum | type |
typedef GLenum GLsizei | stride |
typedef GLenum GLsizei const GLvoid * | pointer |
typedef GLfloat | x |
typedef GLfloat GLfloat | y |
typedef GLfloat GLfloat GLfloat | z |
typedef GLfloat GLfloat GLfloat GLfloat | w |
typedef void(GL_APIENTRY * | VertexAttrib4fProc )(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w) |
typedef void(GL_APIENTRY * | VertexAttrib4fvProc )(GLuint index, const GLfloat *v) |
typedef GLboolean | normalized |
typedef GLboolean GLsizei | stride |
typedef GLboolean GLsizei const GLvoid * | pointer |
typedef GLuint | buffer |
typedef void(GL_APIENTRY * | DrawArraysInstancedProc )(GLenum mode, GLint first, GLsizei count, GLsizei primcount) |
typedef void(GL_APIENTRY * | DrawElementsInstancedProc )(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount) |
Protected Member Functions | |
virtual | ~State () |
void | setUpVertexAttribAlias (VertexAttribAlias &alias, GLuint location, const std::string glName, const std::string osgName, const std::string &declaration) |
bool | applyMode (StateAttribute::GLMode mode, bool enabled, ModeStack &ms) |
Apply an OpenGL mode if required, passing in mode, enable flag and appropriate mode stack. | |
bool | applyModeOnTexUnit (unsigned int unit, StateAttribute::GLMode mode, bool enabled, ModeStack &ms) |
bool | applyAttribute (const StateAttribute *attribute, AttributeStack &as) |
apply an attribute if required, passing in attribute and appropriate attribute stack | |
bool | applyAttributeOnTexUnit (unsigned int unit, const StateAttribute *attribute, AttributeStack &as) |
bool | applyGlobalDefaultAttribute (AttributeStack &as) |
bool | applyGlobalDefaultAttributeOnTexUnit (unsigned int unit, AttributeStack &as) |
ModeMap & | getOrCreateTextureModeMap (unsigned int unit) |
AttributeMap & | getOrCreateTextureAttributeMap (unsigned int unit) |
void | pushModeList (ModeMap &modeMap, const StateSet::ModeList &modeList) |
void | pushAttributeList (AttributeMap &attributeMap, const StateSet::AttributeList &attributeList) |
void | pushUniformList (UniformMap &uniformMap, const StateSet::UniformList &uniformList) |
void | popModeList (ModeMap &modeMap, const StateSet::ModeList &modeList) |
void | popAttributeList (AttributeMap &attributeMap, const StateSet::AttributeList &attributeList) |
void | popUniformList (UniformMap &uniformMap, const StateSet::UniformList &uniformList) |
void | applyModeList (ModeMap &modeMap, const StateSet::ModeList &modeList) |
void | applyAttributeList (AttributeMap &attributeMap, const StateSet::AttributeList &attributeList) |
void | applyUniformList (UniformMap &uniformMap, const StateSet::UniformList &uniformList) |
void | applyModeMap (ModeMap &modeMap) |
void | applyAttributeMap (AttributeMap &attributeMap) |
void | applyUniformMap (UniformMap &uniformMap) |
void | applyModeListOnTexUnit (unsigned int unit, ModeMap &modeMap, const StateSet::ModeList &modeList) |
void | applyAttributeListOnTexUnit (unsigned int unit, AttributeMap &attributeMap, const StateSet::AttributeList &attributeList) |
void | applyModeMapOnTexUnit (unsigned int unit, ModeMap &modeMap) |
void | applyAttributeMapOnTexUnit (unsigned int unit, AttributeMap &attributeMap) |
void | haveAppliedMode (ModeMap &modeMap, StateAttribute::GLMode mode, StateAttribute::GLModeValue value) |
void | haveAppliedMode (ModeMap &modeMap, StateAttribute::GLMode mode) |
void | haveAppliedAttribute (AttributeMap &attributeMap, const StateAttribute *attribute) |
void | haveAppliedAttribute (AttributeMap &attributeMap, StateAttribute::Type type, unsigned int member) |
bool | getLastAppliedMode (const ModeMap &modeMap, StateAttribute::GLMode mode) const |
const StateAttribute * | getLastAppliedAttribute (const AttributeMap &attributeMap, StateAttribute::Type type, unsigned int member) const |
void | loadModelViewMatrix () |
bool | computeSecondaryColorSupported () const |
bool | computeFogCoordSupported () const |
bool | computeVertexBufferObjectSupported () const |
typedef | void (GL_APIENTRY *ActiveTextureProc)(GLenum texture) |
typedef | void (GL_APIENTRY *FogCoordPointerProc)(GLenum type |
typedef | void (GL_APIENTRY *SecondaryColorPointerProc)(GLint size |
typedef | void (GL_APIENTRY *MultiTexCoord4fProc)(GLenum target |
typedef | void (GL_APIENTRY *VertexAttribPointerProc)(unsigned int |
typedef | void (GL_APIENTRY *EnableVertexAttribProc)(unsigned int) |
typedef | void (GL_APIENTRY *DisableVertexAttribProc)(unsigned int) |
typedef | void (GL_APIENTRY *BindBufferProc)(GLenum target |
Protected Attributes | |
GraphicsContext * | _graphicsContext |
unsigned int | _contextID |
bool | _shaderCompositionEnabled |
bool | _shaderCompositionDirty |
osg::ref_ptr< ShaderComposer > | _shaderComposer |
osg::Program * | _currentShaderCompositionProgram |
StateSet::UniformList | _currentShaderCompositionUniformList |
ref_ptr< FrameStamp > | _frameStamp |
ref_ptr< const RefMatrix > | _identity |
ref_ptr< const RefMatrix > | _initialViewMatrix |
ref_ptr< const RefMatrix > | _projection |
ref_ptr< const RefMatrix > | _modelView |
ref_ptr< RefMatrix > | _modelViewCache |
bool | _useModelViewAndProjectionUniforms |
ref_ptr< Uniform > | _modelViewMatrixUniform |
ref_ptr< Uniform > | _projectionMatrixUniform |
ref_ptr< Uniform > | _modelViewProjectionMatrixUniform |
ref_ptr< Uniform > | _normalMatrixUniform |
Matrix | _initialInverseViewMatrix |
ref_ptr< DisplaySettings > | _displaySettings |
bool * | _abortRenderingPtr |
CheckForGLErrors | _checkGLErrors |
bool | _useVertexAttributeAliasing |
VertexAttribAlias | _vertexAlias |
VertexAttribAlias | _normalAlias |
VertexAttribAlias | _colorAlias |
VertexAttribAlias | _secondaryColorAlias |
VertexAttribAlias | _fogCoordAlias |
VertexAttribAliasList | _texCoordAliasList |
Program::AttribBindingList | _attributeBindingList |
ModeMap | _modeMap |
AttributeMap | _attributeMap |
UniformMap | _uniformMap |
TextureModeMapList | _textureModeMapList |
TextureAttributeMapList | _textureAttributeMapList |
AppliedProgramObjectSet | _appliedProgramObjectSet |
const Program::PerContextProgram * | _lastAppliedProgramObject |
StateSetStack | _stateStateStack |
unsigned int | _maxTexturePoolSize |
unsigned int | _maxBufferObjectPoolSize |
EnabledArrayPair | _vertexArray |
EnabledArrayPair | _normalArray |
EnabledArrayPair | _colorArray |
EnabledArrayPair | _secondaryColorArray |
EnabledArrayPair | _fogArray |
EnabledTexCoordArrayList | _texCoordArrayList |
EnabledVertexAttribArrayList | _vertexAttribArrayList |
unsigned int | _currentActiveTextureUnit |
unsigned int | _currentClientActiveTextureUnit |
GLBufferObject * | _currentVBO |
GLBufferObject * | _currentEBO |
GLBufferObject * | _currentPBO |
bool | _isSecondaryColorSupportResolved |
bool | _isSecondaryColorSupported |
bool | _isFogCoordSupportResolved |
bool | _isFogCoordSupported |
bool | _isVertexBufferObjectSupportResolved |
bool | _isVertexBufferObjectSupported |
typedef | GLint |
typedef | GLenum |
bool | _extensionProcsInitialized |
GLint | _glMaxTextureCoords |
GLint | _glMaxTextureUnits |
ActiveTextureProc | _glClientActiveTexture |
ActiveTextureProc | _glActiveTexture |
MultiTexCoord4fProc | _glMultiTexCoord4f |
VertexAttrib4fProc | _glVertexAttrib4f |
VertexAttrib4fvProc | _glVertexAttrib4fv |
FogCoordPointerProc | _glFogCoordPointer |
SecondaryColorPointerProc | _glSecondaryColorPointer |
VertexAttribPointerProc | _glVertexAttribPointer |
EnableVertexAttribProc | _glEnableVertexAttribArray |
DisableVertexAttribProc | _glDisableVertexAttribArray |
BindBufferProc | _glBindBuffer |
DrawArraysInstancedProc | _glDrawArraysInstanced |
DrawElementsInstancedProc | _glDrawElementsInstanced |
unsigned int | _dynamicObjectCount |
osg::ref_ptr < DynamicObjectRenderingCompletedCallback > | _completeDynamicObjectRenderingCallback |
GLBeginEndAdapter | _glBeginEndAdapter |
ArrayDispatchers | _arrayDispatchers |
osg::ref_ptr < GraphicsCostEstimator > | _graphicsCostEstimator |
Timer_t | _startTick |
Timer_t | _gpuTick |
GLuint64EXT | _gpuTimestamp |
int | _timestampBits |
Encapsulates the current applied OpenGL modes, attributes and vertex arrays settings, implements lazy state updating and provides accessors for querying the current state.
The venerable Red Book says that "OpenGL is a state machine", and this class represents the OpenGL state in OSG. Furthermore, State
also has other important features:
pushStateSet()
and popStateSet()
). Manipulating this stack of OpenGL states manually is seldom needed, since OSG does this in the most common situations.glGet*
(), which typically stall the graphics pipeline (see, for instance, captureCurrentState()
and getModelViewMatrix()
). typedef std::set<const Program::PerContextProgram* > osg::State::AppliedProgramObjectSet [protected] |
typedef std::map<StateAttribute::TypeMemberPair,AttributeStack> osg::State::AttributeMap [protected] |
typedef std::pair<const StateAttribute*,StateAttribute::OverrideValue> osg::State::AttributePair |
typedef std::vector<AttributePair> osg::State::AttributeVec |
typedef GLuint osg::State::buffer [protected] |
typedef void(GL_APIENTRY * osg::State::DrawArraysInstancedProc)(GLenum mode, GLint first, GLsizei count, GLsizei primcount) [protected] |
typedef void(GL_APIENTRY * osg::State::DrawElementsInstancedProc)(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount) [protected] |
typedef std::vector<EnabledArrayPair> osg::State::EnabledTexCoordArrayList [protected] |
typedef std::vector<EnabledArrayPair> osg::State::EnabledVertexAttribArrayList [protected] |
typedef std::vector<GLuint> osg::State::IndicesGLuint |
typedef std::vector<GLushort> osg::State::IndicesGLushort |
typedef std::vector<ref_ptr<const Matrix> > osg::State::MatrixStack [protected] |
typedef std::map<StateAttribute::GLMode,ModeStack> osg::State::ModeMap [protected] |
typedef GLboolean osg::State::normalized [protected] |
typedef GLsizei const GLvoid* osg::State::pointer [protected] |
typedef GLenum GLsizei const GLvoid* osg::State::pointer [protected] |
typedef GLboolean GLsizei const GLvoid* osg::State::pointer [protected] |
typedef std::vector<const StateSet*> osg::State::StateSetStack |
typedef GLsizei osg::State::stride [protected] |
typedef GLenum GLsizei osg::State::stride [protected] |
typedef GLboolean GLsizei osg::State::stride [protected] |
typedef std::vector<AttributeMap> osg::State::TextureAttributeMapList [protected] |
typedef std::vector<ModeMap> osg::State::TextureModeMapList [protected] |
typedef GLenum osg::State::type [protected] |
typedef std::map<std::string,UniformStack> osg::State::UniformMap [protected] |
typedef void(GL_APIENTRY * osg::State::VertexAttrib4fProc)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w) [protected] |
typedef void(GL_APIENTRY * osg::State::VertexAttrib4fvProc)(GLuint index, const GLfloat *v) [protected] |
typedef std::vector<VertexAttribAlias> osg::State::VertexAttribAliasList |
typedef GLfloat GLfloat GLfloat GLfloat osg::State::w [protected] |
typedef GLfloat osg::State::x [protected] |
typedef GLfloat GLfloat osg::State::y [protected] |
typedef GLfloat GLfloat GLfloat osg::State::z [protected] |
osg::State::State | ( | ) |
virtual osg::State::~State | ( | ) | [protected, virtual] |
void osg::State::apply | ( | const StateSet * | dstate | ) |
Apply stateset.
void osg::State::apply | ( | ) |
bool osg::State::applyAttribute | ( | const StateAttribute * | attribute | ) | [inline] |
Apply an attribute if required.
References osg::StateAttribute::getTypeMemberPair(), and osg::State::AttributeStack::changed.
Referenced by applyAttributeList(), and applyAttributeMap().
bool osg::State::applyAttribute | ( | const StateAttribute * | attribute, |
AttributeStack & | as | ||
) | [inline, protected] |
apply an attribute if required, passing in attribute and appropriate attribute stack
References osg::State::AttributeStack::last_applied_attribute, osg::State::AttributeStack::global_default_attribute, osg::ref_ptr::valid(), osg::StateAttribute::cloneType(), osg::StateAttribute::apply(), osg::StateAttribute::getShaderComponent(), and osg::State::AttributeStack::last_applied_shadercomponent.
void osg::State::applyAttributeList | ( | AttributeMap & | attributeMap, |
const StateSet::AttributeList & | attributeList | ||
) | [inline, protected] |
void osg::State::applyAttributeListOnTexUnit | ( | unsigned int | unit, |
AttributeMap & | attributeMap, | ||
const StateSet::AttributeList & | attributeList | ||
) | [inline, protected] |
void osg::State::applyAttributeMap | ( | AttributeMap & | attributeMap | ) | [inline, protected] |
void osg::State::applyAttributeMapOnTexUnit | ( | unsigned int | unit, |
AttributeMap & | attributeMap | ||
) | [inline, protected] |
bool osg::State::applyAttributeOnTexUnit | ( | unsigned int | unit, |
const StateAttribute * | attribute, | ||
AttributeStack & | as | ||
) | [inline, protected] |
References osg::State::AttributeStack::last_applied_attribute, osg::State::AttributeStack::global_default_attribute, osg::ref_ptr::valid(), osg::StateAttribute::cloneType(), osg::StateAttribute::apply(), osg::StateAttribute::getShaderComponent(), and osg::State::AttributeStack::last_applied_shadercomponent.
Referenced by applyAttributeListOnTexUnit(), and applyAttributeMapOnTexUnit().
void osg::State::applyDisablingOfVertexAttributes | ( | ) |
Disable all the vertex attributes that have been marked as to be disabled.
bool osg::State::applyGlobalDefaultAttribute | ( | AttributeStack & | as | ) | [inline, protected] |
bool osg::State::applyGlobalDefaultAttributeOnTexUnit | ( | unsigned int | unit, |
AttributeStack & | as | ||
) | [inline, protected] |
References osg::State::AttributeStack::last_applied_attribute, osg::State::AttributeStack::global_default_attribute, osg::ref_ptr::get(), osg::ref_ptr::valid(), and osg::State::AttributeStack::last_applied_shadercomponent.
Referenced by applyAttributeListOnTexUnit(), and applyAttributeMapOnTexUnit().
bool osg::State::applyMode | ( | StateAttribute::GLMode | mode, |
bool | enabled | ||
) | [inline] |
Apply an OpenGL mode if required.
This is a wrapper around glEnable()
and glDisable()
, that just actually calls these functions if the enabled
flag is different than the current state.
true
if the state was actually changed. false
otherwise. Notice that a false
return does not indicate an error, it just means that the mode was already set to the same value as the enabled
parameter. References osg::State::ModeStack::changed.
Referenced by applyModeList(), and applyModeMap().
bool osg::State::applyMode | ( | StateAttribute::GLMode | mode, |
bool | enabled, | ||
ModeStack & | ms | ||
) | [inline, protected] |
Apply an OpenGL mode if required, passing in mode, enable flag and appropriate mode stack.
This is a wrapper around glEnable()
and glDisable()
, that just actually calls these functions if the enabled
flag is different than the current state.
true
if the state was actually changed. false
otherwise. Notice that a false
return does not indicate an error, it just means that the mode was already set to the same value as the enabled
parameter. References osg::State::ModeStack::valid, and osg::State::ModeStack::last_applied_value.
void osg::State::applyModeList | ( | ModeMap & | modeMap, |
const StateSet::ModeList & | modeList | ||
) | [inline, protected] |
void osg::State::applyModeListOnTexUnit | ( | unsigned int | unit, |
ModeMap & | modeMap, | ||
const StateSet::ModeList & | modeList | ||
) | [inline, protected] |
void osg::State::applyModelViewAndProjectionUniformsIfRequired | ( | ) |
void osg::State::applyModelViewMatrix | ( | const osg::RefMatrix * | matrix | ) |
void osg::State::applyModelViewMatrix | ( | const osg::Matrix & | ) |
void osg::State::applyModeMap | ( | ModeMap & | modeMap | ) | [inline, protected] |
void osg::State::applyModeMapOnTexUnit | ( | unsigned int | unit, |
ModeMap & | modeMap | ||
) | [inline, protected] |
bool osg::State::applyModeOnTexUnit | ( | unsigned int | unit, |
StateAttribute::GLMode | mode, | ||
bool | enabled, | ||
ModeStack & | ms | ||
) | [inline, protected] |
References osg::State::ModeStack::valid, and osg::State::ModeStack::last_applied_value.
Referenced by applyModeListOnTexUnit(), and applyModeMapOnTexUnit().
void osg::State::applyProjectionMatrix | ( | const osg::RefMatrix * | matrix | ) |
void osg::State::applyShaderComposition | ( | ) |
Apply any shader composed state.
void osg::State::applyShaderCompositionUniform | ( | const osg::Uniform * | uniform, |
StateAttribute::OverrideValue | value = StateAttribute::ON |
||
) | [inline] |
Convinience method for StateAttribute:::apply(State&) methods to pass on their uniforms to osg::State so it can apply them at the appropriate point.
References osg::Object::getName().
bool osg::State::applyTextureAttribute | ( | unsigned int | unit, |
const StateAttribute * | attribute | ||
) | [inline] |
bool osg::State::applyTextureMode | ( | unsigned int | unit, |
StateAttribute::GLMode | mode, | ||
bool | enabled | ||
) | [inline] |
References osg::State::ModeStack::changed.
void osg::State::applyUniformList | ( | UniformMap & | uniformMap, |
const StateSet::UniformList & | uniformList | ||
) | [inline, protected] |
void osg::State::applyUniformMap | ( | UniformMap & | uniformMap | ) | [inline, protected] |
void osg::State::bindElementBufferObject | ( | osg::GLBufferObject * | ebo | ) | [inline] |
void osg::State::bindPixelBufferObject | ( | osg::GLBufferObject * | pbo | ) | [inline] |
void osg::State::bindVertexBufferObject | ( | osg::GLBufferObject * | vbo | ) | [inline] |
void osg::State::captureCurrentState | ( | StateSet & | stateset | ) | const |
Copy the modes and attributes which capture the current state.
bool osg::State::checkGLErrors | ( | const char * | str | ) | const |
bool osg::State::checkGLErrors | ( | StateAttribute::GLMode | mode | ) | const |
bool osg::State::checkGLErrors | ( | const StateAttribute * | attribute | ) | const |
void osg::State::Color | ( | float | r, |
float | g, | ||
float | b, | ||
float | a = 1.0f |
||
) | [inline] |
bool osg::State::computeFogCoordSupported | ( | ) | const [protected] |
bool osg::State::computeSecondaryColorSupported | ( | ) | const [protected] |
bool osg::State::computeVertexBufferObjectSupported | ( | ) | const [protected] |
bool osg::State::convertVertexShaderSourceToOsgBuiltIns | ( | std::string & | source | ) | const |
void osg::State::decrementDynamicObjectCount | ( | ) | [inline] |
Decrement the number of dynamic objects left to render this frame, and once the count goes to zero call the DynamicObjectRenderingCompletedCallback to inform of completion.
void osg::State::dirtyAllAttributes | ( | ) |
Dirty the modes attributes previously applied in osg::State.
void osg::State::dirtyAllModes | ( | ) |
Dirty the modes previously applied in osg::State.
void osg::State::dirtyAllVertexArrays | ( | ) |
dirty the vertex, normal, color, tex coords, secondary color, fog coord and index arrays.
void osg::State::dirtyColorPointer | ( | ) | [inline] |
void osg::State::dirtyFogCoordPointer | ( | ) | [inline] |
void osg::State::dirtyNormalPointer | ( | ) | [inline] |
void osg::State::dirtySecondaryColorPointer | ( | ) | [inline] |
void osg::State::dirtyTexCoordPointer | ( | unsigned int | unit | ) | [inline] |
void osg::State::dirtyTexCoordPointersAboveAndIncluding | ( | unsigned int | unit | ) | [inline] |
void osg::State::dirtyVertexAttribPointer | ( | unsigned int | index | ) | [inline] |
void osg::State::dirtyVertexAttribPointersAboveAndIncluding | ( | unsigned int | index | ) | [inline] |
void osg::State::dirtyVertexPointer | ( | ) | [inline] |
void osg::State::disableAllVertexArrays | ( | ) |
disable the vertex, normal, color, tex coords, secondary color, fog coord and index arrays.
void osg::State::disableColorPointer | ( | ) | [inline] |
wrapper around glDisableClientState(GL_COLOR_ARRAY); note, only updates values that change.
void osg::State::disableFogCoordPointer | ( | ) | [inline] |
wrapper around glDisableClientState(GL_FOG_COORDINATE_ARRAY); note, only updates values that change.
References GL_FOG_COORDINATE_ARRAY.
void osg::State::disableNormalPointer | ( | ) | [inline] |
wrapper around glDisableClientState(GL_NORMAL_ARRAY); note, only updates values that change.
void osg::State::disableSecondaryColorPointer | ( | ) | [inline] |
wrapper around glDisableClientState(GL_SECONDARY_COLOR_ARRAY); note, only updates values that change.
References GL_SECONDARY_COLOR_ARRAY.
void osg::State::disableTexCoordPointer | ( | unsigned int | unit | ) | [inline] |
wrapper around glDisableClientState(GL_TEXTURE_COORD_ARRAY); note, only updates values that change.
References osg::State::EnabledArrayPair::_enabled, osg::State::EnabledArrayPair::_dirty, and osg::State::EnabledArrayPair::_lazy_disable.
void osg::State::disableTexCoordPointersAboveAndIncluding | ( | unsigned int | unit | ) | [inline] |
void osg::State::disableVertexAttribPointer | ( | unsigned int | index | ) |
wrapper around DisableVertexAttribArrayARB(index); note, only updates values that change.
void osg::State::disableVertexAttribPointersAboveAndIncluding | ( | unsigned int | index | ) |
void osg::State::disableVertexPointer | ( | ) | [inline] |
wrapper around glDisableClientState(GL_VERTEX_ARRAY).
note, only updates values that change.
void osg::State::drawQuads | ( | GLint | first, |
GLsizei | count, | ||
GLsizei | primCount = 0 |
||
) |
virtual void osg::State::frameCompleted | ( | ) | [virtual] |
called by the GraphicsContext just before GraphicsContext::swapBuffersImplementation().
bool osg::State::getAbortRendering | ( | ) | const [inline] |
Get flag for early termination of the draw traversal, if true steps should be taken to complete rendering early.
unsigned int osg::State::getActiveTextureUnit | ( | ) | const [inline] |
Get the current texture unit.
ArrayDispatchers& osg::State::getArrayDispatchers | ( | ) | [inline] |
Get the helper class for dispatching osg::Arrays as OpenGL attribute data.
GLint osg::State::getAttribLocation | ( | const std::string & | name | ) | const [inline] |
const Program::AttribBindingList& osg::State::getAttributeBindingList | ( | ) | [inline] |
AttributeVec& osg::State::getAttributeVec | ( | const osg::StateAttribute * | attribute | ) | [inline] |
CheckForGLErrors osg::State::getCheckForGLErrors | ( | ) | const [inline] |
Get whether and how often OpenGL errors should be checked for.
unsigned int osg::State::getClientActiveTextureUnit | ( | ) | const [inline] |
Get the current tex coord array texture unit.
const VertexAttribAlias& osg::State::getColorAlias | ( | ) | [inline] |
unsigned int osg::State::getContextID | ( | ) | const [inline] |
Get the current OpenGL context unique ID.
Referenced by osg::Texture2D::SubloadCallback::generateTextureObject().
const GLBufferObject* osg::State::getCurrentElementBufferObject | ( | ) | [inline] |
const GLBufferObject* osg::State::getCurrentPixelBufferObject | ( | ) | [inline] |
StateSet::UniformList& osg::State::getCurrentShaderCompositionUniformList | ( | ) | [inline] |
Get the unform list in which to inject any uniforms that StateAttribute::apply(State&) methods provide.
const GLBufferObject* osg::State::getCurrentVertexBufferObject | ( | ) | [inline] |
const Viewport* osg::State::getCurrentViewport | ( | ) | const [inline] |
References osg::StateAttribute::VIEWPORT.
const DisplaySettings* osg::State::getDisplaySettings | ( | ) | const [inline] |
Get the DisplaySettings.
unsigned int osg::State::getDynamicObjectCount | ( | ) | const [inline] |
Get the number of dynamic objects that will be rendered in this graphics context this frame.
DynamicObjectRenderingCompletedCallback* osg::State::getDynamicObjectRenderingCompletedCallback | ( | ) | [inline] |
Get the callback to be called when the dynamic object count hits 0.
const VertexAttribAlias& osg::State::getFogCoordAlias | ( | ) | [inline] |
FrameStamp* osg::State::getFrameStamp | ( | ) | [inline] |
Get the frame stamp for the current frame.
const FrameStamp* osg::State::getFrameStamp | ( | ) | const [inline] |
Get the const frame stamp for the current frame.
GLBeginEndAdapter& osg::State::getGLBeginEndAdapter | ( | ) | [inline] |
Get the GL adapter object used to map OpenGL 1.0 glBegin/glEnd usage to vertex arrays.
const StateAttribute* osg::State::getGlobalDefaultAttribute | ( | StateAttribute::Type | type, |
unsigned int | member = 0 |
||
) | [inline] |
References osg::State::AttributeStack::global_default_attribute, and osg::ref_ptr::get().
bool osg::State::getGlobalDefaultModeValue | ( | StateAttribute::GLMode | mode | ) | [inline] |
const StateAttribute* osg::State::getGlobalDefaultTextureAttribute | ( | unsigned int | unit, |
StateAttribute::Type | type, | ||
unsigned int | member = 0 |
||
) | [inline] |
References osg::State::AttributeStack::global_default_attribute, and osg::ref_ptr::get().
bool osg::State::getGlobalDefaultTextureModeValue | ( | unsigned int | unit, |
StateAttribute::GLMode | mode | ||
) | [inline] |
References osg::State::ModeStack::global_default_value.
Timer_t osg::State::getGpuTick | ( | ) | const [inline] |
double osg::State::getGpuTime | ( | ) | const [inline] |
References osg::Timer::instance(), and osg::Timer::delta_s().
GLuint64EXT osg::State::getGpuTimestamp | ( | ) | const [inline] |
GraphicsContext* osg::State::getGraphicsContext | ( | ) | [inline] |
Get the graphics context associated with that owns this State object.
const GraphicsContext* osg::State::getGraphicsContext | ( | ) | const [inline] |
Get the const graphics context associated with that owns this State object.
GraphicsCostEstimator* osg::State::getGraphicsCostEstimator | ( | ) | [inline] |
Get the helper class that provides applications with estimate on how much different graphics operations will cost.
const GraphicsCostEstimator* osg::State::getGraphicsCostEstimator | ( | ) | const [inline] |
Get the cont helper class that provides applications with estimate on how much different graphics operations will cost.
const osg::Matrix& osg::State::getInitialInverseViewMatrix | ( | ) | const [inline] |
const osg::Matrix& osg::State::getInitialViewMatrix | ( | ) | const [inline] |
const StateAttribute* osg::State::getLastAppliedAttribute | ( | StateAttribute::Type | type, |
unsigned int | member = 0 |
||
) | const |
Get the current specified attribute, return NULL if one has not yet been applied.
const StateAttribute* osg::State::getLastAppliedAttribute | ( | const AttributeMap & | attributeMap, |
StateAttribute::Type | type, | ||
unsigned int | member | ||
) | const [protected] |
bool osg::State::getLastAppliedMode | ( | StateAttribute::GLMode | mode | ) | const |
Get whether the current specified mode is enabled (true) or disabled (false).
bool osg::State::getLastAppliedMode | ( | const ModeMap & | modeMap, |
StateAttribute::GLMode | mode | ||
) | const [protected] |
const Program::PerContextProgram* osg::State::getLastAppliedProgramObject | ( | ) | const [inline] |
const StateAttribute* osg::State::getLastAppliedTextureAttribute | ( | unsigned int | unit, |
StateAttribute::Type | type, | ||
unsigned int | member = 0 |
||
) | const |
Get the current specified texture attribute, return NULL if one has not yet been applied.
bool osg::State::getLastAppliedTextureMode | ( | unsigned int | unit, |
StateAttribute::GLMode | mode | ||
) | const |
Get whether the current specified texture mode is enabled (true) or disabled (false).
unsigned int osg::State::getMaxBufferObjectPoolSize | ( | ) | const [inline] |
unsigned int osg::State::getMaxTexturePoolSize | ( | ) | const [inline] |
Referenced by osg::Texture::isSafeToUnrefImageData().
const osg::Matrix& osg::State::getModelViewMatrix | ( | ) | const [inline] |
osg::Uniform* osg::State::getModelViewMatrixUniform | ( | ) | [inline] |
References osg::Uniform::get().
osg::Uniform* osg::State::getModelViewProjectionMatrixUniform | ( | ) | [inline] |
References osg::Uniform::get().
bool osg::State::getModeValidity | ( | StateAttribute::GLMode | mode | ) | [inline] |
Get whether a particular OpenGL mode is valid in the current graphics context.
Use to disable OpenGL modes that are not supported by current graphics drivers/context.
References osg::State::ModeStack::valid.
const VertexAttribAlias& osg::State::getNormalAlias | ( | ) | [inline] |
osg::Uniform* osg::State::getNormalMatrixUniform | ( | ) | [inline] |
References osg::Uniform::get().
AttributeMap& osg::State::getOrCreateTextureAttributeMap | ( | unsigned int | unit | ) | [inline, protected] |
ModeMap& osg::State::getOrCreateTextureModeMap | ( | unsigned int | unit | ) | [inline, protected] |
const osg::Matrix& osg::State::getProjectionMatrix | ( | ) | const [inline] |
osg::Uniform* osg::State::getProjectionMatrixUniform | ( | ) | [inline] |
References osg::Uniform::get().
const VertexAttribAlias& osg::State::getSecondaryColorAlias | ( | ) | [inline] |
ShaderComposer* osg::State::getShaderComposer | ( | ) | [inline] |
Get the ShaderComposor object.
const ShaderComposer* osg::State::getShaderComposer | ( | ) | const [inline] |
Get the const ShaderComposor object.
bool osg::State::getShaderCompositionEnabled | ( | ) | const [inline] |
Timer_t osg::State::getStartTick | ( | ) | const [inline] |
Support for synchronizing the system time and the timestamp counter available with ARB_timer_query.
Note that State doesn't update these values itself.
StateSetStack& osg::State::getStateSetStack | ( | ) | [inline] |
Get the StateSet stack.
unsigned int osg::State::getStateSetStackSize | ( | ) | [inline] |
Get the number of StateSet's on the StateSet stack.
const VertexAttribAliasList& osg::State::getTexCoordAliasList | ( | ) | [inline] |
int osg::State::getTimestampBits | ( | ) | const [inline] |
GLint osg::State::getUniformLocation | ( | unsigned int | uniformNameID | ) | const [inline] |
GLint osg::State::getUniformLocation | ( | const std::string & | uniformName | ) | const [inline] |
Alternative version of getUniformLocation( unsigned int uniformNameID ) retrofited into OSG for backward compatibility with osgCal, after uniform ids were refactored from std::strings to GLints in OSG version 2.9.10.
Drawbacks: This method is not particularly fast. It has to access mutexed static map of uniform ids. So don't overuse it or your app performance will suffer.
bool osg::State::getUseModelViewAndProjectionUniforms | ( | ) | const [inline] |
bool osg::State::getUseVertexAttributeAliasing | ( | ) | const [inline] |
const VertexAttribAlias& osg::State::getVertexAlias | ( | ) | [inline] |
Polytope osg::State::getViewFrustum | ( | ) | const |
void osg::State::glDrawArraysInstanced | ( | GLenum | mode, |
GLint | first, | ||
GLsizei | count, | ||
GLsizei | primcount | ||
) | [inline] |
void osg::State::glDrawElementsInstanced | ( | GLenum | mode, |
GLsizei | count, | ||
GLenum | type, | ||
const GLvoid * | indices, | ||
GLsizei | primcount | ||
) | [inline] |
void osg::State::haveAppliedAttribute | ( | const StateAttribute * | attribute | ) |
Attribute has been applied externally, update state to reflect this setting.
void osg::State::haveAppliedAttribute | ( | StateAttribute::Type | type, |
unsigned int | member = 0 |
||
) |
Attribute has been applied externally, and therefore this attribute type has been dirtied and will need to be re-applied 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 cause the osg::State to track the current state more accurately and enable lazy state updating such that only changed state will be applied.
void osg::State::haveAppliedAttribute | ( | AttributeMap & | attributeMap, |
const StateAttribute * | attribute | ||
) | [protected] |
void osg::State::haveAppliedAttribute | ( | AttributeMap & | attributeMap, |
StateAttribute::Type | type, | ||
unsigned int | member | ||
) | [protected] |
void osg::State::haveAppliedMode | ( | StateAttribute::GLMode | mode, |
StateAttribute::GLModeValue | value | ||
) |
Mode has been set externally, update state to reflect this setting.
void osg::State::haveAppliedMode | ( | StateAttribute::GLMode | mode | ) |
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 osg::State::haveAppliedMode | ( | ModeMap & | modeMap, |
StateAttribute::GLMode | mode, | ||
StateAttribute::GLModeValue | value | ||
) | [protected] |
void osg::State::haveAppliedMode | ( | ModeMap & | modeMap, |
StateAttribute::GLMode | mode | ||
) | [protected] |
void osg::State::haveAppliedTextureAttribute | ( | unsigned int | unit, |
const StateAttribute * | attribute | ||
) |
texture Attribute has been applied externally, update state to reflect this setting.
void osg::State::haveAppliedTextureAttribute | ( | unsigned int | unit, |
StateAttribute::Type | type, | ||
unsigned int | member = 0 |
||
) |
texture Attribute has been applied externally, and therefore this attribute type has been dirtied and will need to be re-applied 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 accurately and enable lazy state updating such that only changed state will be applied.
void osg::State::haveAppliedTextureMode | ( | unsigned int | unit, |
StateAttribute::GLMode | mode, | ||
StateAttribute::GLModeValue | value | ||
) |
texture Mode has been set externally, update state to reflect this setting.
void osg::State::haveAppliedTextureMode | ( | unsigned int | unit, |
StateAttribute::GLMode | mode | ||
) |
texture 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 osg::State::initializeExtensionProcs | ( | ) |
Initialize extension used by osg:::State.
void osg::State::insertStateSet | ( | unsigned int | pos, |
const StateSet * | dstate | ||
) |
Insert stateset onto state stack.
bool osg::State::isFogCoordSupported | ( | ) | const [inline] |
bool osg::State::isSecondaryColorSupported | ( | ) | const [inline] |
bool osg::State::isVertexBufferObjectSupported | ( | ) | const [inline] |
Referenced by osg::Drawable::draw().
void osg::State::lazyDisablingOfVertexAttributes | ( | ) |
Mark all the vertex attributes as being disabled but leave the disabling till a later call to applyDisablingOfVertexAttributes.
void osg::State::loadModelViewMatrix | ( | ) | [protected] |
void osg::State::MultiTexCoord | ( | unsigned int | unit, |
float | x, | ||
float | y = 0.0f , |
||
float | z = 0.0f , |
||
float | w = 1.0f |
||
) | [inline] |
References GL_TEXTURE0.
void osg::State::Normal | ( | float | x, |
float | y, | ||
float | z | ||
) | [inline] |
virtual void osg::State::objectDeleted | ( | void * | ) | [virtual] |
objectDeleted is called when the observed object is about to be deleted.
The observer will be automatically removed from the observerd objects observer set so there is no need for the objectDeleted implementation to call removeObserver() on the observed object.
Reimplemented from osg::Observer.
void osg::State::popAllStateSets | ( | ) |
pop all statesets off state stack, ensuring it is empty ready for the next frame.
Note, to return OpenGL to default state, one should do any state.popAllStatSets(); state.apply().
void osg::State::popAttributeList | ( | AttributeMap & | attributeMap, |
const StateSet::AttributeList & | attributeList | ||
) | [inline, protected] |
void osg::State::popModeList | ( | ModeMap & | modeMap, |
const StateSet::ModeList & | modeList | ||
) | [inline, protected] |
References osg::State::ModeStack::valueVec, and osg::State::ModeStack::changed.
void osg::State::popStateSet | ( | ) |
Pop stateset off state stack.
Referenced by osgUtil::StateGraph::moveStateGraph(), and osgUtil::StateGraph::moveToRootStateGraph().
void osg::State::popStateSetStackToSize | ( | unsigned int | size | ) | [inline] |
Pop StateSet's for the StateSet stack till its size equals the specified size.
void osg::State::popUniformList | ( | UniformMap & | uniformMap, |
const StateSet::UniformList & | uniformList | ||
) | [inline, protected] |
References osg::State::UniformStack::uniformVec.
void osg::State::print | ( | std::ostream & | fout | ) | const |
print out the internal details of osg::State - useful for debugging.
void osg::State::pushAttributeList | ( | AttributeMap & | attributeMap, |
const StateSet::AttributeList & | attributeList | ||
) | [inline, protected] |
void osg::State::pushModeList | ( | ModeMap & | modeMap, |
const StateSet::ModeList & | modeList | ||
) | [inline, protected] |
void osg::State::pushStateSet | ( | const StateSet * | dstate | ) |
Push stateset onto state stack.
Referenced by osgUtil::StateGraph::moveStateGraph().
void osg::State::pushUniformList | ( | UniformMap & | uniformMap, |
const StateSet::UniformList & | uniformList | ||
) | [inline, protected] |
References osg::State::UniformStack::uniformVec, and osg::StateAttribute::PROTECTED.
void osg::State::removeStateSet | ( | unsigned int | pos | ) |
Pop stateset off state stack.
void osg::State::reset | ( | ) |
reset the state object to an empty stack.
void osg::State::setAbortRenderingPtr | ( | bool * | abortPtr | ) | [inline] |
Set flag for early termination of the draw traversal.
bool osg::State::setActiveTextureUnit | ( | unsigned int | unit | ) | [inline] |
Set the current texture unit, return true if selected, false if selection failed such as when multi texturing is not supported.
note, only updates values that change.
References _currentActiveTextureUnit, _glActiveTexture, osg::maximum(), _glMaxTextureCoords, _glMaxTextureUnits, and GL_TEXTURE0.
void osg::State::setCheckForGLErrors | ( | CheckForGLErrors | check | ) | [inline] |
Set whether and how often OpenGL errors should be checked for.
bool osg::State::setClientActiveTextureUnit | ( | unsigned int | unit | ) |
Set the current tex coord array texture unit, return true if selected, false if selection failed such as when multi texturing is not supported.
note, only updates values that change.
void osg::State::setColorPointer | ( | const Array * | array | ) | [inline] |
Set the color pointer using an osg::Array, and manage any VBO that are required.
References osg::BufferData::getOrCreateGLBufferObject(), osg::Array::getDataSize(), osg::Array::getDataType(), osg::GLBufferObject::getOffset(), osg::BufferData::getBufferIndex(), and osg::Array::getDataPointer().
void osg::State::setColorPointer | ( | GLint | size, |
GLenum | type, | ||
GLsizei | stride, | ||
const GLvoid * | ptr | ||
) | [inline] |
wrapper around glEnableClientState(GL_COLOR_ARRAY);glColorPointer(..); note, only updates values that change.
void osg::State::setContextID | ( | unsigned int | contextID | ) | [inline] |
Set the current OpenGL context uniqueID.
The ContextID is used by classes like osg::StateAttribute's and osg::Drawable's to help manage seperate OpenGL objects, such as display lists, vertex buffer objects and texture object for each graphics context. The ContextID simply acts as an index into arrays that these classes maintain for the purpose of storing GL object handles.
Note, osgViewer::GraphicsWindow will automatically set up the ContextID for you, so you will rearely need to set this yourself.
The exception is when creating your own graphics context, where you should set the ContextID uniquely for each graphics context.
Typical settings for ContextID are 0,1,2,3... up to the maximum number of graphics contexts you have set up. By default contextID is 0.
void osg::State::setCurrentElementBufferObject | ( | osg::GLBufferObject * | ebo | ) | [inline] |
void osg::State::setCurrentPixelBufferObject | ( | osg::GLBufferObject * | pbo | ) | [inline] |
void osg::State::setCurrentVertexBufferObject | ( | osg::GLBufferObject * | vbo | ) | [inline] |
void osg::State::setDisplaySettings | ( | DisplaySettings * | vs | ) | [inline] |
Set the DisplaySettings.
Note, nothing is applied, the visual settings are just used in the State object to pass the current visual settings to Drawables during rendering.
void osg::State::setDynamicObjectCount | ( | unsigned int | count, |
bool | callCallbackOnZero = false |
||
) | [inline] |
Set the number of dynamic objects that will be rendered in this graphics context this frame.
References osg::State::DynamicObjectRenderingCompletedCallback::completed().
void osg::State::setDynamicObjectRenderingCompletedCallback | ( | DynamicObjectRenderingCompletedCallback * | cb | ) | [inline] |
Set the callback to be called when the dynamic object count hits 0.
void osg::State::setFogCoordPointer | ( | const Array * | array | ) | [inline] |
Set the fog coord pointer using an osg::Array, and manage any VBO that are required.
References osg::BufferData::getOrCreateGLBufferObject(), osg::Array::getDataType(), osg::GLBufferObject::getOffset(), osg::BufferData::getBufferIndex(), and osg::Array::getDataPointer().
void osg::State::setFogCoordPointer | ( | GLenum | type, |
GLsizei | stride, | ||
const GLvoid * | ptr | ||
) |
wrapper around glEnableClientState(GL_FOG_COORDINATE_ARRAY);glFogCoordPointer(..); note, only updates values that change.
void osg::State::setFrameStamp | ( | FrameStamp * | fs | ) | [inline] |
Set the frame stamp for the current frame.
void osg::State::setGlobalDefaultAttribute | ( | const StateAttribute * | attribute | ) | [inline] |
void osg::State::setGlobalDefaultModeValue | ( | StateAttribute::GLMode | mode, |
bool | enabled | ||
) | [inline] |
References osg::State::ModeStack::global_default_value.
void osg::State::setGlobalDefaultTextureAttribute | ( | unsigned int | unit, |
const StateAttribute * | attribute | ||
) | [inline] |
void osg::State::setGlobalDefaultTextureModeValue | ( | unsigned int | unit, |
StateAttribute::GLMode | mode, | ||
bool | enabled | ||
) | [inline] |
References osg::State::ModeStack::global_default_value.
void osg::State::setGpuTimestamp | ( | Timer_t | tick, |
GLuint64EXT | timestamp | ||
) | [inline] |
void osg::State::setGraphicsContext | ( | GraphicsContext * | context | ) | [inline] |
Set the graphics context associated with that owns this State object.
void osg::State::setGraphicsCostEstimator | ( | GraphicsCostEstimator * | gce | ) | [inline] |
Set the helper class that provides applications with estimate on how much different graphics operations will cost.
void osg::State::setInitialViewMatrix | ( | const osg::RefMatrix * | matrix | ) |
void osg::State::setInterleavedArrays | ( | GLenum | format, |
GLsizei | stride, | ||
const GLvoid * | pointer | ||
) |
Wrapper around glInterleavedArrays(..).
also resets the internal array points and modes within osg::State to keep the other vertex array operations consistent.
void osg::State::setLastAppliedProgramObject | ( | const Program::PerContextProgram * | program | ) | [inline] |
References osg::Referenced::addObserver().
void osg::State::setMaxBufferObjectPoolSize | ( | unsigned int | size | ) |
void osg::State::setMaxTexturePoolSize | ( | unsigned int | size | ) |
void osg::State::setModeValidity | ( | StateAttribute::GLMode | mode, |
bool | valid | ||
) | [inline] |
Set whether a particular OpenGL mode is valid in the current graphics context.
Use to disable OpenGL modes that are not supported by current graphics drivers/context.
References osg::State::ModeStack::valid.
void osg::State::setNormalPointer | ( | const Array * | array | ) | [inline] |
Set the normal pointer using an osg::Array, and manage any VBO that are required.
References osg::BufferData::getOrCreateGLBufferObject(), osg::Array::getDataType(), osg::GLBufferObject::getOffset(), osg::BufferData::getBufferIndex(), and osg::Array::getDataPointer().
void osg::State::setNormalPointer | ( | GLenum | type, |
GLsizei | stride, | ||
const GLvoid * | ptr | ||
) | [inline] |
wrapper around glEnableClientState(GL_NORMAL_ARRAY);glNormalPointer(..); note, only updates values that change.
void osg::State::setSecondaryColorPointer | ( | const Array * | array | ) | [inline] |
Set the secondary color pointer using an osg::Array, and manage any VBO that are required.
References osg::BufferData::getOrCreateGLBufferObject(), osg::Array::getDataSize(), osg::Array::getDataType(), osg::GLBufferObject::getOffset(), osg::BufferData::getBufferIndex(), and osg::Array::getDataPointer().
void osg::State::setSecondaryColorPointer | ( | GLint | size, |
GLenum | type, | ||
GLsizei | stride, | ||
const GLvoid * | ptr | ||
) |
wrapper around glEnableClientState(GL_SECONDARY_COLOR_ARRAY);glSecondayColorPointer(..); note, only updates values that change.
void osg::State::setShaderComposer | ( | ShaderComposer * | sc | ) | [inline] |
Set the ShaderComposor object that implements shader composition.
void osg::State::setShaderCompositionEnabled | ( | bool | flag | ) | [inline] |
void osg::State::setStartTick | ( | Timer_t | tick | ) | [inline] |
void osg::State::setTexCoordPointer | ( | unsigned int | unit, |
const Array * | array | ||
) | [inline] |
Set the tex coord pointer using an osg::Array, and manage any VBO that are required.
References osg::BufferData::getOrCreateGLBufferObject(), osg::Array::getDataSize(), osg::Array::getDataType(), osg::GLBufferObject::getOffset(), osg::BufferData::getBufferIndex(), and osg::Array::getDataPointer().
void osg::State::setTexCoordPointer | ( | unsigned int | unit, |
GLint | size, | ||
GLenum | type, | ||
GLsizei | stride, | ||
const GLvoid * | ptr | ||
) | [inline] |
wrapper around glEnableClientState(GL_TEXTURE_COORD_ARRAY);glTexCoordPointer(..); note, only updates values that change.
References osg::State::EnabledArrayPair::_enabled, osg::State::EnabledArrayPair::_dirty, osg::State::EnabledArrayPair::_pointer, and osg::State::EnabledArrayPair::_lazy_disable.
void osg::State::setTimestampBits | ( | int | bits | ) | [inline] |
void osg::State::setUpVertexAttribAlias | ( | VertexAttribAlias & | alias, |
GLuint | location, | ||
const std::string | glName, | ||
const std::string | osgName, | ||
const std::string & | declaration | ||
) | [protected] |
void osg::State::setUseModelViewAndProjectionUniforms | ( | bool | flag | ) | [inline] |
void osg::State::setUseVertexAttributeAliasing | ( | bool | flag | ) | [inline] |
void osg::State::setVertexAttribPointer | ( | unsigned int | unit, |
const Array * | array, | ||
GLboolean | normalized | ||
) | [inline] |
Set the vertex attrib pointer using an osg::Array, and manage any VBO that are required.
References osg::BufferData::getOrCreateGLBufferObject(), osg::Array::getDataSize(), osg::Array::getDataType(), osg::GLBufferObject::getOffset(), osg::BufferData::getBufferIndex(), and osg::Array::getDataPointer().
void osg::State::setVertexAttribPointer | ( | unsigned int | index, |
GLint | size, | ||
GLenum | type, | ||
GLboolean | normalized, | ||
GLsizei | stride, | ||
const GLvoid * | ptr | ||
) |
wrapper around glEnableVertexAttribArrayARB(index);glVertexAttribPointerARB(..); note, only updates values that change.
void osg::State::setVertexPointer | ( | const Array * | array | ) | [inline] |
Set the vertex pointer using an osg::Array, and manage any VBO that are required.
References osg::BufferData::getOrCreateGLBufferObject(), osg::Array::getDataSize(), osg::Array::getDataType(), osg::GLBufferObject::getOffset(), osg::BufferData::getBufferIndex(), and osg::Array::getDataPointer().
void osg::State::setVertexPointer | ( | GLint | size, |
GLenum | type, | ||
GLsizei | stride, | ||
const GLvoid * | ptr | ||
) | [inline] |
wrapper around glEnableClientState(GL_VERTEX_ARRAY);glVertexPointer(..); note, only updates values that change.
void osg::State::TexCoord | ( | float | x, |
float | y = 0.0f , |
||
float | z = 0.0f , |
||
float | w = 1.0f |
||
) | [inline] |
void osg::State::unbindElementBufferObject | ( | ) | [inline] |
References GL_ELEMENT_ARRAY_BUFFER_ARB.
void osg::State::unbindPixelBufferObject | ( | ) | [inline] |
References GL_PIXEL_UNPACK_BUFFER_ARB.
void osg::State::unbindVertexBufferObject | ( | ) | [inline] |
References GL_ARRAY_BUFFER_ARB.
void osg::State::updateModelViewAndProjectionMatrixUniforms | ( | ) |
void osg::State::VerteAttrib | ( | unsigned int | location, |
float | x, | ||
float | y = 0.0f , |
||
float | z = 0.0f , |
||
float | w = 0.0f |
||
) | [inline] |
void osg::State::Vertex | ( | float | x, |
float | y, | ||
float | z, | ||
float | w = 1.0f |
||
) | [inline] |
typedef osg::State::void | ( | GL_APIENTRY * | ActiveTextureProc | ) | [protected] |
typedef osg::State::void | ( | GL_APIENTRY * | FogCoordPointerProc | ) | [protected] |
typedef osg::State::void | ( | GL_APIENTRY * | SecondaryColorPointerProc | ) | [protected] |
typedef osg::State::void | ( | GL_APIENTRY * | MultiTexCoord4fProc | ) | [protected] |
typedef osg::State::void | ( | GL_APIENTRY * | VertexAttribPointerProc | ) | [protected] |
typedef osg::State::void | ( | GL_APIENTRY * | EnableVertexAttribProc | ) | [protected] |
typedef osg::State::void | ( | GL_APIENTRY * | DisableVertexAttribProc | ) | [protected] |
typedef osg::State::void | ( | GL_APIENTRY * | BindBufferProc | ) | [protected] |
bool* osg::State::_abortRenderingPtr [protected] |
ArrayDispatchers osg::State::_arrayDispatchers [protected] |
AttributeMap osg::State::_attributeMap [protected] |
CheckForGLErrors osg::State::_checkGLErrors [protected] |
VertexAttribAlias osg::State::_colorAlias [protected] |
EnabledArrayPair osg::State::_colorArray [protected] |
osg::ref_ptr<DynamicObjectRenderingCompletedCallback> osg::State::_completeDynamicObjectRenderingCallback [protected] |
unsigned int osg::State::_contextID [protected] |
unsigned int osg::State::_currentActiveTextureUnit [protected] |
Referenced by setActiveTextureUnit().
unsigned int osg::State::_currentClientActiveTextureUnit [protected] |
GLBufferObject* osg::State::_currentEBO [protected] |
GLBufferObject* osg::State::_currentPBO [protected] |
osg::Program* osg::State::_currentShaderCompositionProgram [protected] |
GLBufferObject* osg::State::_currentVBO [protected] |
ref_ptr<DisplaySettings> osg::State::_displaySettings [protected] |
unsigned int osg::State::_dynamicObjectCount [protected] |
bool osg::State::_extensionProcsInitialized [protected] |
EnabledArrayPair osg::State::_fogArray [protected] |
VertexAttribAlias osg::State::_fogCoordAlias [protected] |
ref_ptr<FrameStamp> osg::State::_frameStamp [protected] |
ActiveTextureProc osg::State::_glActiveTexture [protected] |
Referenced by setActiveTextureUnit().
GLBeginEndAdapter osg::State::_glBeginEndAdapter [protected] |
BindBufferProc osg::State::_glBindBuffer [protected] |
ActiveTextureProc osg::State::_glClientActiveTexture [protected] |
DisableVertexAttribProc osg::State::_glDisableVertexAttribArray [protected] |
EnableVertexAttribProc osg::State::_glEnableVertexAttribArray [protected] |
FogCoordPointerProc osg::State::_glFogCoordPointer [protected] |
GLint osg::State::_glMaxTextureCoords [protected] |
Referenced by setActiveTextureUnit().
GLint osg::State::_glMaxTextureUnits [protected] |
Referenced by setActiveTextureUnit().
MultiTexCoord4fProc osg::State::_glMultiTexCoord4f [protected] |
SecondaryColorPointerProc osg::State::_glSecondaryColorPointer [protected] |
VertexAttrib4fProc osg::State::_glVertexAttrib4f [protected] |
VertexAttrib4fvProc osg::State::_glVertexAttrib4fv [protected] |
VertexAttribPointerProc osg::State::_glVertexAttribPointer [protected] |
Timer_t osg::State::_gpuTick [protected] |
GLuint64EXT osg::State::_gpuTimestamp [protected] |
GraphicsContext* osg::State::_graphicsContext [protected] |
ref_ptr<const RefMatrix> osg::State::_identity [protected] |
Matrix osg::State::_initialInverseViewMatrix [protected] |
ref_ptr<const RefMatrix> osg::State::_initialViewMatrix [protected] |
bool osg::State::_isFogCoordSupported [mutable, protected] |
bool osg::State::_isFogCoordSupportResolved [mutable, protected] |
bool osg::State::_isSecondaryColorSupported [mutable, protected] |
bool osg::State::_isSecondaryColorSupportResolved [mutable, protected] |
bool osg::State::_isVertexBufferObjectSupported [mutable, protected] |
bool osg::State::_isVertexBufferObjectSupportResolved [mutable, protected] |
const Program::PerContextProgram* osg::State::_lastAppliedProgramObject [protected] |
Referenced by applyUniformList(), and applyUniformMap().
unsigned int osg::State::_maxBufferObjectPoolSize [protected] |
unsigned int osg::State::_maxTexturePoolSize [protected] |
ref_ptr<const RefMatrix> osg::State::_modelView [protected] |
ref_ptr<RefMatrix> osg::State::_modelViewCache [protected] |
ref_ptr<Uniform> osg::State::_modelViewMatrixUniform [protected] |
ref_ptr<Uniform> osg::State::_modelViewProjectionMatrixUniform [protected] |
ModeMap osg::State::_modeMap [protected] |
VertexAttribAlias osg::State::_normalAlias [protected] |
EnabledArrayPair osg::State::_normalArray [protected] |
ref_ptr<Uniform> osg::State::_normalMatrixUniform [protected] |
ref_ptr<const RefMatrix> osg::State::_projection [protected] |
ref_ptr<Uniform> osg::State::_projectionMatrixUniform [protected] |
VertexAttribAlias osg::State::_secondaryColorAlias [protected] |
EnabledArrayPair osg::State::_secondaryColorArray [protected] |
osg::ref_ptr<ShaderComposer> osg::State::_shaderComposer [protected] |
bool osg::State::_shaderCompositionDirty [protected] |
bool osg::State::_shaderCompositionEnabled [protected] |
Timer_t osg::State::_startTick [protected] |
StateSetStack osg::State::_stateStateStack [protected] |
VertexAttribAliasList osg::State::_texCoordAliasList [protected] |
TextureModeMapList osg::State::_textureModeMapList [protected] |
int osg::State::_timestampBits [protected] |
UniformMap osg::State::_uniformMap [protected] |
bool osg::State::_useModelViewAndProjectionUniforms [protected] |
bool osg::State::_useVertexAttributeAliasing [protected] |
VertexAttribAlias osg::State::_vertexAlias [protected] |
EnabledArrayPair osg::State::_vertexArray [protected] |
typedef osg::State::GLenum [protected] |
typedef osg::State::GLint [protected] |
![]() | Generated at Mon Oct 3 2011 12:39:44 for the OpenSceneGraph by doxygen 1.7.5. |