OSG  3.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Public Types | Public Member Functions | Public Attributes | Protected Types | Protected Member Functions | Protected Attributes | List of all members
osg::State Class Reference

#include <State.h>

Inheritance diagram for osg::State:
Inheritance graph
[legend]
Collaboration diagram for osg::State:
Collaboration graph
[legend]

Classes

struct  AttributeStack
 
struct  DefineMap
 
struct  DefineStack
 
struct  DynamicObjectRenderingCompletedCallback
 
struct  EnabledArrayPair
 
struct  ModeStack
 
struct  UniformStack
 

Public Types

enum  CheckForGLErrors { NEVER_CHECK_GL_ERRORS, ONCE_PER_FRAME, ONCE_PER_ATTRIBUTE }
 
typedef std::map< const
std::type_info *, osg::ref_ptr
< osg::Referenced > > 
ExtensionMap
 
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
 
typedef std::map
< StateAttribute::GLMode,
ModeStack
ModeMap
 
typedef std::vector< ModeMapTextureModeMapList
 
typedef std::map
< StateAttribute::TypeMemberPair,
AttributeStack
AttributeMap
 
typedef std::vector< AttributeMapTextureAttributeMapList
 
typedef std::map< std::string,
UniformStack
UniformMap
 
typedef std::vector< ref_ptr
< const Matrix > > 
MatrixStack
 

Public Member Functions

 State ()
 
void setGraphicsContext (GraphicsContext *context)
 
GraphicsContextgetGraphicsContext ()
 
const GraphicsContextgetGraphicsContext () const
 
void setContextID (unsigned int contextID)
 
unsigned int getContextID () const
 
template<typename T >
T * get ()
 
template<typename T >
const T * get () const
 
void setShaderCompositionEnabled (bool flag)
 
bool getShaderCompositionEnabled () const
 
void setShaderComposer (ShaderComposer *sc)
 
ShaderComposergetShaderComposer ()
 
const ShaderComposergetShaderComposer () const
 
StateSet::UniformListgetCurrentShaderCompositionUniformList ()
 
void applyShaderCompositionUniform (const osg::Uniform *uniform, StateAttribute::OverrideValue value=StateAttribute::ON)
 
void pushStateSet (const StateSet *dstate)
 
void popStateSet ()
 
void popAllStateSets ()
 
void insertStateSet (unsigned int pos, const StateSet *dstate)
 
void removeStateSet (unsigned int pos)
 
unsigned int getStateSetStackSize ()
 
void popStateSetStackToSize (unsigned int size)
 
StateSetStackgetStateSetStack ()
 
void captureCurrentState (StateSet &stateset) const
 
void releaseGLObjects ()
 
void reset ()
 
const ViewportgetCurrentViewport () const
 
void setInitialViewMatrix (const osg::RefMatrix *matrix)
 
const osg::MatrixgetInitialViewMatrix () const
 
const osg::MatrixgetInitialInverseViewMatrix () const
 
void applyProjectionMatrix (const osg::RefMatrix *matrix)
 
const osg::MatrixgetProjectionMatrix () const
 
void applyModelViewMatrix (const osg::RefMatrix *matrix)
 
void applyModelViewMatrix (const osg::Matrix &)
 
const osg::MatrixgetModelViewMatrix () const
 
void setUseModelViewAndProjectionUniforms (bool flag)
 
bool getUseModelViewAndProjectionUniforms () const
 
void updateModelViewAndProjectionMatrixUniforms ()
 
void applyModelViewAndProjectionUniformsIfRequired ()
 
osg::UniformgetModelViewMatrixUniform ()
 
osg::UniformgetProjectionMatrixUniform ()
 
osg::UniformgetModelViewProjectionMatrixUniform ()
 
osg::UniformgetNormalMatrixUniform ()
 
Polytope getViewFrustum () const
 
void setUseVertexAttributeAliasing (bool flag)
 
bool getUseVertexAttributeAliasing () const
 
void resetVertexAttributeAlias (bool compactAliasing=true, unsigned int numTextureUnits=8)
 
void setVertexAlias (const VertexAttribAlias &alias)
 
const VertexAttribAliasgetVertexAlias ()
 
void setNormalAlias (const VertexAttribAlias &alias)
 
const VertexAttribAliasgetNormalAlias ()
 
void setColorAlias (const VertexAttribAlias &alias)
 
const VertexAttribAliasgetColorAlias ()
 
void setSecondaryColorAlias (const VertexAttribAlias &alias)
 
const VertexAttribAliasgetSecondaryColorAlias ()
 
void setFogCoordAlias (const VertexAttribAlias &alias)
 
const VertexAttribAliasgetFogCoordAlias ()
 
void setTexCoordAliasList (const VertexAttribAliasList &aliasList)
 
const VertexAttribAliasListgetTexCoordAliasList ()
 
void setAttributeBindingList (const Program::AttribBindingList &attribBindingList)
 
const Program::AttribBindingListgetAttributeBindingList ()
 
bool convertVertexShaderSourceToOsgBuiltIns (std::string &source) const
 
void apply (const StateSet *dstate)
 
void apply ()
 
void applyShaderComposition ()
 
void setModeValidity (StateAttribute::GLMode mode, bool valid)
 
bool getModeValidity (StateAttribute::GLMode mode)
 
void setGlobalDefaultModeValue (StateAttribute::GLMode mode, bool enabled)
 
bool getGlobalDefaultModeValue (StateAttribute::GLMode mode)
 
bool applyMode (StateAttribute::GLMode mode, bool enabled)
 
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 StateAttributegetGlobalDefaultAttribute (StateAttribute::Type type, unsigned int member=0)
 
bool applyAttribute (const StateAttribute *attribute)
 
void setGlobalDefaultTextureAttribute (unsigned int unit, const StateAttribute *attribute)
 
const StateAttributegetGlobalDefaultTextureAttribute (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)
 
void haveAppliedMode (StateAttribute::GLMode mode)
 
void haveAppliedAttribute (const StateAttribute *attribute)
 
void haveAppliedAttribute (StateAttribute::Type type, unsigned int member=0)
 
bool getLastAppliedMode (StateAttribute::GLMode mode) const
 
const StateAttributegetLastAppliedAttribute (StateAttribute::Type type, unsigned int member=0) const
 
void haveAppliedTextureMode (unsigned int unit, StateAttribute::GLMode mode, StateAttribute::GLModeValue value)
 
void haveAppliedTextureMode (unsigned int unit, StateAttribute::GLMode mode)
 
void haveAppliedTextureAttribute (unsigned int unit, const StateAttribute *attribute)
 
void haveAppliedTextureAttribute (unsigned int unit, StateAttribute::Type type, unsigned int member=0)
 
bool getLastAppliedTextureMode (unsigned int unit, StateAttribute::GLMode mode) const
 
const StateAttributegetLastAppliedTextureAttribute (unsigned int unit, StateAttribute::Type type, unsigned int member=0) const
 
void dirtyAllModes ()
 
void dirtyAllAttributes ()
 
void disableAllVertexArrays ()
 
void dirtyAllVertexArrays ()
 
void setCurrentVertexBufferObject (osg::GLBufferObject *vbo)
 
const GLBufferObjectgetCurrentVertexBufferObject ()
 
void bindVertexBufferObject (osg::GLBufferObject *vbo)
 
void unbindVertexBufferObject ()
 
void setCurrentElementBufferObject (osg::GLBufferObject *ebo)
 
const GLBufferObjectgetCurrentElementBufferObject ()
 
void bindElementBufferObject (osg::GLBufferObject *ebo)
 
void unbindElementBufferObject ()
 
void setCurrentPixelBufferObject (osg::GLBufferObject *pbo)
 
const GLBufferObjectgetCurrentPixelBufferObject ()
 
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 ()
 
void applyDisablingOfVertexAttributes ()
 
void setInterleavedArrays (GLenum format, GLsizei stride, const GLvoid *pointer)
 
void setVertexPointer (const Array *array)
 
void setVertexPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *ptr, GLboolean normalized=GL_FALSE)
 
void disableVertexPointer ()
 
void dirtyVertexPointer ()
 
void setNormalPointer (const Array *array)
 
void setNormalPointer (GLenum type, GLsizei stride, const GLvoid *ptr, GLboolean normalized=GL_FALSE)
 
void disableNormalPointer ()
 
void dirtyNormalPointer ()
 
void setColorPointer (const Array *array)
 
void setColorPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *ptr, GLboolean normalized=GL_TRUE)
 
void disableColorPointer ()
 
void dirtyColorPointer ()
 
bool isSecondaryColorSupported () const
 
void setSecondaryColorPointer (const Array *array)
 
void setSecondaryColorPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *ptr, GLboolean normalized=GL_TRUE)
 
void disableSecondaryColorPointer ()
 
void dirtySecondaryColorPointer ()
 
bool isFogCoordSupported () const
 
void setFogCoordPointer (const Array *array)
 
void setFogCoordPointer (GLenum type, GLsizei stride, const GLvoid *ptr, GLboolean normalized=GL_FALSE)
 
void disableFogCoordPointer ()
 
void dirtyFogCoordPointer ()
 
void setTexCoordPointer (unsigned int unit, const Array *array)
 
void setTexCoordPointer (unsigned int unit, GLint size, GLenum type, GLsizei stride, const GLvoid *ptr, GLboolean normalized=GL_FALSE)
 
void disableTexCoordPointer (unsigned int unit)
 
void dirtyTexCoordPointer (unsigned int unit)
 
void disableTexCoordPointersAboveAndIncluding (unsigned int unit)
 
void dirtyTexCoordPointersAboveAndIncluding (unsigned int unit)
 
GLint getMaxTextureCoords () const
 For GL>=2.0 uses GL_MAX_TEXTURE_COORDS, for GL<2 uses GL_MAX_TEXTURE_UNITS. More...
 
GLint getMaxTextureUnits () const
 For GL>=2.0 uses GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, for GL<2 uses GL_MAX_TEXTURE_UNITS. More...
 
bool setActiveTextureUnit (unsigned int unit)
 
unsigned int getActiveTextureUnit () const
 
bool setClientActiveTextureUnit (unsigned int unit)
 
unsigned int getClientActiveTextureUnit () const
 
void setVertexAttribPointer (unsigned int unit, const Array *array)
 
void setVertexAttribLPointer (unsigned int unit, const Array *array)
 
void setVertexAttribIPointer (unsigned int unit, const Array *array)
 
void setVertexAttribPointer (unsigned int index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *ptr)
 
void setVertexAttribIPointer (unsigned int index, GLint size, GLenum type, GLsizei stride, const GLvoid *ptr)
 
void setVertexAttribLPointer (unsigned int index, GLint size, GLenum type, GLsizei stride, const GLvoid *ptr)
 
void disableVertexAttribPointer (unsigned int index)
 
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::PerContextProgramgetLastAppliedProgramObject () const
 
GLint getUniformLocation (unsigned int uniformNameID) const
 
GLint getUniformLocation (const std::string &uniformName) const
 
GLint getAttribLocation (const std::string &name) const
 
AttributeVecgetAttributeVec (const osg::StateAttribute *attribute)
 
void setFrameStamp (FrameStamp *fs)
 
FrameStampgetFrameStamp ()
 
const FrameStampgetFrameStamp () const
 
void setDisplaySettings (DisplaySettings *vs)
 
const DisplaySettingsgetDisplaySettings () const
 
void setAbortRenderingPtr (bool *abortPtr)
 
bool getAbortRendering () const
 
void setDynamicObjectRenderingCompletedCallback (DynamicObjectRenderingCompletedCallback *cb)
 
DynamicObjectRenderingCompletedCallbackgetDynamicObjectRenderingCompletedCallback ()
 
void setDynamicObjectCount (unsigned int count, bool callCallbackOnZero=false)
 
unsigned int getDynamicObjectCount () const
 
void decrementDynamicObjectCount ()
 
void setMaxTexturePoolSize (unsigned int size)
 
unsigned int getMaxTexturePoolSize () const
 
void setMaxBufferObjectPoolSize (unsigned int size)
 
unsigned int getMaxBufferObjectPoolSize () const
 
void setCheckForGLErrors (CheckForGLErrors check)
 
CheckForGLErrors getCheckForGLErrors () const
 
bool checkGLErrors (const char *str) const
 
bool checkGLErrors (StateAttribute::GLMode mode) const
 
bool checkGLErrors (const StateAttribute *attribute) const
 
void print (std::ostream &fout) const
 
void initializeExtensionProcs ()
 
GLBeginEndAdaptergetGLBeginEndAdapter ()
 
ArrayDispatchersgetArrayDispatchers ()
 
void setGraphicsCostEstimator (GraphicsCostEstimator *gce)
 
GraphicsCostEstimatorgetGraphicsCostEstimator ()
 
const GraphicsCostEstimatorgetGraphicsCostEstimator () const
 
Timer_t getStartTick () const
 
void setStartTick (Timer_t tick)
 
Timer_t getGpuTick () const
 
double getGpuTime () const
 
GLuint64 getGpuTimestamp () const
 
void setGpuTimestamp (Timer_t tick, GLuint64 timestamp)
 
int getTimestampBits () const
 
void setTimestampBits (int bits)
 
virtual void frameCompleted ()
 
const ModeMapgetModeMap () const
 
const AttributeMapgetAttributeMap () const
 
const UniformMapgetUniformMap () const
 
DefineMapgetDefineMap ()
 
const DefineMapgetDefineMap () const
 
const TextureModeMapListgetTextureModeMapList () const
 
const TextureAttributeMapListgetTextureAttributeMapList () const
 
std::string getDefineString (const osg::ShaderDefines &shaderDefines)
 
bool supportsShaderRequirements (const osg::ShaderDefines &shaderRequirements)
 
bool supportsShaderRequirement (const std::string &shaderRequirement)
 
template<>
GLExtensionsget ()
 
template<>
const GLExtensionsget () const
 
- Public Member Functions inherited from osg::Referenced
 Referenced ()
 
 Referenced (bool threadSafeRefUnref)
 
 Referenced (const Referenced &)
 
Referencedoperator= (const Referenced &)
 
virtual void setThreadSafeRefUnref (bool threadSafe)
 
bool getThreadSafeRefUnref () const
 
OpenThreads::MutexgetRefMutex () const
 
int ref () const
 
int unref () const
 
int unref_nodelete () const
 
int referenceCount () const
 
ObserverSetgetObserverSet () const
 
ObserverSetgetOrCreateObserverSet () const
 
void addObserver (Observer *observer) const
 
void removeObserver (Observer *observer) const
 

Public Attributes

ExtensionMap _extensionMap
 
IndicesGLushort _quadIndicesGLushort [4]
 
IndicesGLuint _quadIndicesGLuint [4]
 

Protected Types

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_APIENTRYVertexAttrib4fProc )(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
 
typedef void(GL_APIENTRYVertexAttrib4fvProc )(GLuint index, const GLfloat *v)
 
typedef GLboolean normalized
 
typedef GLboolean GLsizei stride
 
typedef GLboolean GLsizei
const GLvoid * 
pointer
 
typedef GLsizei stride
 
typedef GLsizei const GLvoid * pointer
 
typedef GLsizei stride
 
typedef GLsizei const GLvoid * pointer
 
typedef GLuint buffer
 
typedef void(GL_APIENTRYDrawArraysInstancedProc )(GLenum mode, GLint first, GLsizei count, GLsizei primcount)
 
typedef void(GL_APIENTRYDrawElementsInstancedProc )(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)
 
bool applyModeOnTexUnit (unsigned int unit, StateAttribute::GLMode mode, bool enabled, ModeStack &ms)
 
bool applyAttribute (const StateAttribute *attribute, AttributeStack &as)
 
bool applyAttributeOnTexUnit (unsigned int unit, const StateAttribute *attribute, AttributeStack &as)
 
bool applyGlobalDefaultAttribute (AttributeStack &as)
 
bool applyGlobalDefaultAttributeOnTexUnit (unsigned int unit, AttributeStack &as)
 
ModeMapgetOrCreateTextureModeMap (unsigned int unit)
 
AttributeMapgetOrCreateTextureAttributeMap (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 pushDefineList (DefineMap &defineMap, const StateSet::DefineList &defineList)
 
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 popDefineList (DefineMap &uniformMap, const StateSet::DefineList &defineList)
 
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 applyDefineList (DefineMap &uniformMap, const StateSet::DefineList &defineList)
 
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 StateAttributegetLastAppliedAttribute (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 *VertexAttribIPointerProc)(unsigned int
 
typedef void (GL_APIENTRY *VertexAttribLPointerProc)(unsigned int
 
typedef void (GL_APIENTRY *EnableVertexAttribProc)(unsigned int)
 
typedef void (GL_APIENTRY *DisableVertexAttribProc)(unsigned int)
 
typedef void (GL_APIENTRY *BindBufferProc)(GLenum target
 
- Protected Member Functions inherited from osg::Referenced
virtual ~Referenced ()
 
void signalObserversAndDelete (bool signalDelete, bool doDelete) const
 
void deleteUsingDeleteHandler () const
 

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
 
DefineMap _defineMap
 
TextureModeMapList _textureModeMapList
 
TextureAttributeMapList _textureAttributeMapList
 
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
 
VertexAttribIPointerProc _glVertexAttribIPointer
 
VertexAttribLPointerProc _glVertexAttribLPointer
 
EnableVertexAttribProc _glEnableVertexAttribArray
 
DisableVertexAttribProc _glDisableVertexAttribArray
 
BindBufferProc _glBindBuffer
 
DrawArraysInstancedProc _glDrawArraysInstanced
 
DrawElementsInstancedProc _glDrawElementsInstanced
 
osg::ref_ptr< GLExtensions_glExtensions
 
unsigned int _dynamicObjectCount
 
osg::ref_ptr
< DynamicObjectRenderingCompletedCallback
_completeDynamicObjectRenderingCallback
 
GLBeginEndAdapter _glBeginEndAdapter
 
ArrayDispatchers _arrayDispatchers
 
osg::ref_ptr
< GraphicsCostEstimator
_graphicsCostEstimator
 
Timer_t _startTick
 
Timer_t _gpuTick
 
GLuint64 _gpuTimestamp
 
int _timestampBits
 
- Protected Attributes inherited from osg::Referenced
OpenThreads::AtomicPtr _observerSet
 
OpenThreads::Atomic _refCount
 

Additional Inherited Members

- Static Public Member Functions inherited from osg::Referenced
static OpenThreads::MutexgetGlobalReferencedMutex ()
 
static void setThreadSafeReferenceCounting (bool enableThreadSafeReferenceCounting)
 
static bool getThreadSafeReferenceCounting ()
 
static void setDeleteHandler (DeleteHandler *handler)
 
static DeleteHandlergetDeleteHandler ()
 

Detailed Description

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:

Definition at line 116 of file State.h.

Member Typedef Documentation

Definition at line 1621 of file State.h.

Definition at line 1379 of file State.h.

Definition at line 1380 of file State.h.

typedef GLuint osg::State::buffer
protected

Definition at line 1958 of file State.h.

typedef void(GL_APIENTRY * osg::State::DrawArraysInstancedProc)(GLenum mode, GLint first, GLsizei count, GLsizei primcount)
protected

Definition at line 1960 of file State.h.

typedef void(GL_APIENTRY * osg::State::DrawElementsInstancedProc)(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount)
protected

Definition at line 1961 of file State.h.

Definition at line 1869 of file State.h.

Definition at line 1870 of file State.h.

typedef std::map<const std::type_info*, osg::ref_ptr<osg::Referenced> > osg::State::ExtensionMap

Definition at line 155 of file State.h.

typedef std::vector<GLuint> osg::State::IndicesGLuint

Definition at line 568 of file State.h.

typedef std::vector<GLushort> osg::State::IndicesGLushort

Definition at line 565 of file State.h.

typedef std::vector< ref_ptr<const Matrix> > osg::State::MatrixStack

Definition at line 1627 of file State.h.

Definition at line 1618 of file State.h.

typedef GLboolean osg::State::normalized
protected

Definition at line 1953 of file State.h.

typedef GLsizei const GLvoid* osg::State::pointer
protected

Definition at line 1948 of file State.h.

typedef GLenum GLsizei const GLvoid* osg::State::pointer
protected

Definition at line 1949 of file State.h.

typedef GLboolean GLsizei const GLvoid* osg::State::pointer
protected

Definition at line 1953 of file State.h.

typedef GLsizei const GLvoid* osg::State::pointer
protected

Definition at line 1954 of file State.h.

typedef GLsizei const GLvoid* osg::State::pointer
protected

Definition at line 1955 of file State.h.

typedef std::vector<const StateSet*> osg::State::StateSetStack

Definition at line 234 of file State.h.

typedef GLsizei osg::State::stride
protected

Definition at line 1948 of file State.h.

typedef GLenum GLsizei osg::State::stride
protected

Definition at line 1949 of file State.h.

typedef GLboolean GLsizei osg::State::stride
protected

Definition at line 1953 of file State.h.

typedef GLsizei osg::State::stride
protected

Definition at line 1954 of file State.h.

typedef GLsizei osg::State::stride
protected

Definition at line 1955 of file State.h.

Definition at line 1622 of file State.h.

Definition at line 1619 of file State.h.

typedef GLenum osg::State::type
protected

Definition at line 1949 of file State.h.

typedef std::map<std::string, UniformStack> osg::State::UniformMap

Definition at line 1624 of file State.h.

typedef void(GL_APIENTRY * osg::State::VertexAttrib4fProc)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
protected

Definition at line 1951 of file State.h.

typedef void(GL_APIENTRY * osg::State::VertexAttrib4fvProc)(GLuint index, const GLfloat *v)
protected

Definition at line 1952 of file State.h.

Definition at line 288 of file State.h.

typedef GLfloat GLfloat GLfloat GLfloat osg::State::w
protected

Definition at line 1950 of file State.h.

typedef GLfloat osg::State::x
protected

Definition at line 1950 of file State.h.

typedef GLfloat GLfloat osg::State::y
protected

Definition at line 1950 of file State.h.

typedef GLfloat GLfloat GLfloat osg::State::z
protected

Definition at line 1950 of file State.h.

Member Enumeration Documentation

Enumerator
NEVER_CHECK_GL_ERRORS 

NEVER_CHECK_GL_ERRORS hints that OpenGL need not be checked for, this is the fastest option since checking for errors does incur a small overhead.

ONCE_PER_FRAME 

ONCE_PER_FRAME means that OpenGL errors will be checked for once per frame, the overhead is still small, but at least OpenGL errors that are occurring will be caught, the reporting isn't fine grained enough for debugging purposes.

ONCE_PER_ATTRIBUTE 

ONCE_PER_ATTRIBUTE means that OpenGL errors will be checked for after every attribute is applied, allow errors to be directly associated with particular operations which makes debugging much easier.

Definition at line 1461 of file State.h.

Constructor & Destructor Documentation

osg::State::State ( )
virtual osg::State::~State ( )
protectedvirtual

Member Function Documentation

void osg::State::apply ( const StateSet dstate)

Apply stateset.

void osg::State::apply ( )

Updates the OpenGL state so that it matches the StateSet at the top of the stack of StateSets maintained internally by a State.

bool osg::State::applyAttribute ( const StateAttribute attribute)
inline

Apply an attribute if required.

Definition at line 415 of file State.h.

Here is the call graph for this function:

Here is the caller graph for this function:

bool osg::State::applyAttribute ( const StateAttribute attribute,
AttributeStack as 
)
inlineprotected

apply an attribute if required, passing in attribute and appropriate attribute stack

Definition at line 1736 of file State.h.

Here is the call graph for this function:

void osg::State::applyAttributeList ( AttributeMap attributeMap,
const StateSet::AttributeList attributeList 
)
inlineprotected

Definition at line 2434 of file State.h.

Here is the call graph for this function:

void osg::State::applyAttributeListOnTexUnit ( unsigned int  unit,
AttributeMap attributeMap,
const StateSet::AttributeList attributeList 
)
inlineprotected

Definition at line 2552 of file State.h.

Here is the call graph for this function:

void osg::State::applyAttributeMap ( AttributeMap attributeMap)
inlineprotected

Definition at line 2864 of file State.h.

Here is the call graph for this function:

void osg::State::applyAttributeMapOnTexUnit ( unsigned int  unit,
AttributeMap attributeMap 
)
inlineprotected

Definition at line 2888 of file State.h.

Here is the call graph for this function:

bool osg::State::applyAttributeOnTexUnit ( unsigned int  unit,
const StateAttribute attribute,
AttributeStack as 
)
inlineprotected

Definition at line 1760 of file State.h.

Here is the call graph for this function:

Here is the caller graph for this function:

void osg::State::applyDefineList ( DefineMap uniformMap,
const StateSet::DefineList defineList 
)
inlineprotected

Definition at line 2744 of file State.h.

void osg::State::applyDisablingOfVertexAttributes ( )

Disable all the vertex attributes that have been marked as to be disabled.

bool osg::State::applyGlobalDefaultAttribute ( AttributeStack as)
inlineprotected

Definition at line 1790 of file State.h.

Here is the caller graph for this function:

bool osg::State::applyGlobalDefaultAttributeOnTexUnit ( unsigned int  unit,
AttributeStack as 
)
inlineprotected

Definition at line 1813 of file State.h.

Here is the caller graph for this function:

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.

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

Definition at line 373 of file State.h.

Here is the caller graph for this function:

bool osg::State::applyMode ( StateAttribute::GLMode  mode,
bool  enabled,
ModeStack ms 
)
inlineprotected

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.

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

Definition at line 1696 of file State.h.

void osg::State::applyModeList ( ModeMap modeMap,
const StateSet::ModeList modeList 
)
inlineprotected

Definition at line 2190 of file State.h.

Here is the call graph for this function:

void osg::State::applyModeListOnTexUnit ( unsigned int  unit,
ModeMap modeMap,
const StateSet::ModeList modeList 
)
inlineprotected

Definition at line 2312 of file State.h.

Here is the call graph for this function:

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)
inlineprotected

Definition at line 2812 of file State.h.

Here is the call graph for this function:

void osg::State::applyModeMapOnTexUnit ( unsigned int  unit,
ModeMap modeMap 
)
inlineprotected

Definition at line 2838 of file State.h.

Here is the call graph for this function:

bool osg::State::applyModeOnTexUnit ( unsigned int  unit,
StateAttribute::GLMode  mode,
bool  enabled,
ModeStack ms 
)
inlineprotected

Definition at line 1713 of file State.h.

Here is the caller graph for this function:

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

Convenience method for StateAttribute:::apply(State&) methods to pass on their uniforms to osg::State so it can apply them at the appropriate point.

Definition at line 204 of file State.h.

Here is the call graph for this function:

bool osg::State::applyTextureAttribute ( unsigned int  unit,
const StateAttribute attribute 
)
inline

Definition at line 437 of file State.h.

Here is the call graph for this function:

bool osg::State::applyTextureMode ( unsigned int  unit,
StateAttribute::GLMode  mode,
bool  enabled 
)
inline

Definition at line 394 of file State.h.

void osg::State::applyUniformList ( UniformMap uniformMap,
const StateSet::UniformList uniformList 
)
inlineprotected

Definition at line 2670 of file State.h.

Here is the call graph for this function:

void osg::State::applyUniformMap ( UniformMap uniformMap)
inlineprotected

Definition at line 2912 of file State.h.

Here is the call graph for this function:

void osg::State::bindElementBufferObject ( osg::GLBufferObject ebo)
inline

Definition at line 529 of file State.h.

Here is the call graph for this function:

void osg::State::bindPixelBufferObject ( osg::GLBufferObject pbo)
inline

Definition at line 547 of file State.h.

Here is the call graph for this function:

void osg::State::bindVertexBufferObject ( osg::GLBufferObject vbo)
inline

Definition at line 511 of file State.h.

Here is the call graph for this function:

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

Definition at line 596 of file State.h.

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.

Definition at line 1445 of file State.h.

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

Definition at line 915 of file State.h.

void osg::State::dirtyFogCoordPointer ( )
inline

Definition at line 1051 of file State.h.

void osg::State::dirtyNormalPointer ( )
inline

Definition at line 823 of file State.h.

void osg::State::dirtySecondaryColorPointer ( )
inline

Definition at line 983 of file State.h.

void osg::State::dirtyTexCoordPointer ( unsigned int  unit)
inline

Definition at line 1157 of file State.h.

void osg::State::dirtyTexCoordPointersAboveAndIncluding ( unsigned int  unit)
inline

Definition at line 1207 of file State.h.

void osg::State::dirtyVertexAttribPointer ( unsigned int  index)
inline

Definition at line 1334 of file State.h.

void osg::State::dirtyVertexAttribPointersAboveAndIncluding ( unsigned int  index)
inline

Definition at line 1344 of file State.h.

void osg::State::dirtyVertexPointer ( )
inline

Definition at line 731 of file State.h.

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.

Definition at line 893 of file State.h.

void osg::State::disableFogCoordPointer ( )
inline

wrapper around glDisableClientState(GL_FOG_COORDINATE_ARRAY); note, only updates values that change.

Definition at line 1029 of file State.h.

void osg::State::disableNormalPointer ( )
inline

wrapper around glDisableClientState(GL_NORMAL_ARRAY); note, only updates values that change.

Definition at line 801 of file State.h.

void osg::State::disableSecondaryColorPointer ( )
inline

wrapper around glDisableClientState(GL_SECONDARY_COLOR_ARRAY); note, only updates values that change.

Definition at line 961 of file State.h.

void osg::State::disableTexCoordPointer ( unsigned int  unit)
inline

wrapper around glDisableClientState(GL_TEXTURE_COORD_ARRAY); note, only updates values that change.

Definition at line 1129 of file State.h.

void osg::State::disableTexCoordPointersAboveAndIncluding ( unsigned int  unit)
inline

Definition at line 1177 of file State.h.

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.

Definition at line 709 of file State.h.

void osg::State::drawQuads ( GLint  first,
GLsizei  count,
GLsizei  primCount = 0 
)
virtual void osg::State::frameCompleted ( )
virtual
template<typename T >
T* osg::State::get ( )
inline

Get a specific GL extensions object, initialize if not already present. Note, must only be called from a the graphics context thread associated with this osg::State.

Definition at line 161 of file State.h.

Here is the call graph for this function:

Here is the caller graph for this function:

template<typename T >
const T* osg::State::get ( ) const
inline

Get a specific GL extensions object if it already exists in the extension map. Note, safe to call outwith a the graphics context thread associated with this osg::State. Returns NULL if the desired extension object has not been created yet.

Definition at line 176 of file State.h.

template<>
GLExtensions* osg::State::get ( )
inline

Definition at line 2946 of file State.h.

template<>
const GLExtensions* osg::State::get ( ) const
inline

Definition at line 2947 of file State.h.

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.

Definition at line 1413 of file State.h.

unsigned int osg::State::getActiveTextureUnit ( ) const
inline

Get the current texture unit.

Definition at line 1243 of file State.h.

ArrayDispatchers& osg::State::getArrayDispatchers ( )
inline

Get the helper class for dispatching osg::Arrays as OpenGL attribute data.

Definition at line 1496 of file State.h.

GLint osg::State::getAttribLocation ( const std::string &  name) const
inline

Definition at line 1377 of file State.h.

const Program::AttribBindingList& osg::State::getAttributeBindingList ( )
inline

Definition at line 319 of file State.h.

const AttributeMap& osg::State::getAttributeMap ( ) const
inline

Definition at line 1630 of file State.h.

AttributeVec& osg::State::getAttributeVec ( const osg::StateAttribute attribute)
inline

Definition at line 1382 of file State.h.

Here is the call graph for this function:

CheckForGLErrors osg::State::getCheckForGLErrors ( ) const
inline

Get whether and how often OpenGL errors should be checked for.

Definition at line 1480 of file State.h.

unsigned int osg::State::getClientActiveTextureUnit ( ) const
inline

Get the current tex coord array texture unit.

Definition at line 1251 of file State.h.

const VertexAttribAlias& osg::State::getColorAlias ( )
inline

Definition at line 303 of file State.h.

unsigned int osg::State::getContextID ( ) const
inline

Get the current OpenGL context unique ID.

Definition at line 151 of file State.h.

Here is the caller graph for this function:

const GLBufferObject* osg::State::getCurrentElementBufferObject ( )
inline

Definition at line 527 of file State.h.

const GLBufferObject* osg::State::getCurrentPixelBufferObject ( )
inline

Definition at line 545 of file State.h.

StateSet::UniformList& osg::State::getCurrentShaderCompositionUniformList ( )
inline

Get the unform list in which to inject any uniforms that StateAttribute::apply(State&) methods provide.

Definition at line 201 of file State.h.

const GLBufferObject* osg::State::getCurrentVertexBufferObject ( )
inline

Definition at line 510 of file State.h.

const Viewport* osg::State::getCurrentViewport ( ) const
inline

Definition at line 249 of file State.h.

DefineMap& osg::State::getDefineMap ( )
inline

Definition at line 1632 of file State.h.

const DefineMap& osg::State::getDefineMap ( ) const
inline

Definition at line 1633 of file State.h.

std::string osg::State::getDefineString ( const osg::ShaderDefines shaderDefines)
const DisplaySettings* osg::State::getDisplaySettings ( ) const
inline

Get the DisplaySettings

Definition at line 1404 of file State.h.

unsigned int osg::State::getDynamicObjectCount ( ) const
inline

Get the number of dynamic objects that will be rendered in this graphics context this frame.

Definition at line 1441 of file State.h.

DynamicObjectRenderingCompletedCallback* osg::State::getDynamicObjectRenderingCompletedCallback ( )
inline

Get the callback to be called when the dynamic object count hits 0.

Definition at line 1425 of file State.h.

const VertexAttribAlias& osg::State::getFogCoordAlias ( )
inline

Definition at line 311 of file State.h.

FrameStamp* osg::State::getFrameStamp ( )
inline

Get the frame stamp for the current frame.

Definition at line 1392 of file State.h.

const FrameStamp* osg::State::getFrameStamp ( ) const
inline

Get the const frame stamp for the current frame.

Definition at line 1395 of file State.h.

GLBeginEndAdapter& osg::State::getGLBeginEndAdapter ( )
inline

Get the GL adapter object used to map OpenGL 1.0 glBegin/glEnd usage to vertex arrays.

Definition at line 1493 of file State.h.

const StateAttribute* osg::State::getGlobalDefaultAttribute ( StateAttribute::Type  type,
unsigned int  member = 0 
)
inline

Definition at line 408 of file State.h.

bool osg::State::getGlobalDefaultModeValue ( StateAttribute::GLMode  mode)
inline

Definition at line 358 of file State.h.

const StateAttribute* osg::State::getGlobalDefaultTextureAttribute ( unsigned int  unit,
StateAttribute::Type  type,
unsigned int  member = 0 
)
inline

Definition at line 429 of file State.h.

bool osg::State::getGlobalDefaultTextureModeValue ( unsigned int  unit,
StateAttribute::GLMode  mode 
)
inline

Definition at line 387 of file State.h.

Timer_t osg::State::getGpuTick ( ) const
inline

Definition at line 1516 of file State.h.

double osg::State::getGpuTime ( ) const
inline

Definition at line 1518 of file State.h.

Here is the call graph for this function:

GLuint64 osg::State::getGpuTimestamp ( ) const
inline

Definition at line 1522 of file State.h.

GraphicsContext* osg::State::getGraphicsContext ( )
inline

Get the graphics context associated with that owns this State object.

Definition at line 127 of file State.h.

const GraphicsContext* osg::State::getGraphicsContext ( ) const
inline

Get the const graphics context associated with that owns this State object.

Definition at line 130 of file State.h.

GraphicsCostEstimator* osg::State::getGraphicsCostEstimator ( )
inline

Get the helper class that provides applications with estimate on how much different graphics operations will cost.

Definition at line 1503 of file State.h.

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.

Definition at line 1506 of file State.h.

const osg::Matrix& osg::State::getInitialInverseViewMatrix ( ) const
inline

Definition at line 258 of file State.h.

const osg::Matrix& osg::State::getInitialViewMatrix ( ) const
inline

Definition at line 257 of file State.h.

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

Definition at line 1365 of file State.h.

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

Definition at line 1458 of file State.h.

GLint osg::State::getMaxTextureCoords ( ) const
inline

For GL>=2.0 uses GL_MAX_TEXTURE_COORDS, for GL<2 uses GL_MAX_TEXTURE_UNITS.

Definition at line 1231 of file State.h.

unsigned int osg::State::getMaxTexturePoolSize ( ) const
inline

Definition at line 1455 of file State.h.

Here is the caller graph for this function:

GLint osg::State::getMaxTextureUnits ( ) const
inline

For GL>=2.0 uses GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, for GL<2 uses GL_MAX_TEXTURE_UNITS.

Definition at line 1234 of file State.h.

const osg::Matrix& osg::State::getModelViewMatrix ( ) const
inline

Definition at line 267 of file State.h.

osg::Uniform* osg::State::getModelViewMatrixUniform ( )
inline

Definition at line 276 of file State.h.

Here is the call graph for this function:

osg::Uniform* osg::State::getModelViewProjectionMatrixUniform ( )
inline

Definition at line 278 of file State.h.

Here is the call graph for this function:

const ModeMap& osg::State::getModeMap ( ) const
inline

Definition at line 1629 of file State.h.

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.

Definition at line 346 of file State.h.

const VertexAttribAlias& osg::State::getNormalAlias ( )
inline

Definition at line 299 of file State.h.

osg::Uniform* osg::State::getNormalMatrixUniform ( )
inline

Definition at line 279 of file State.h.

Here is the call graph for this function:

AttributeMap& osg::State::getOrCreateTextureAttributeMap ( unsigned int  unit)
inlineprotected

Definition at line 1894 of file State.h.

ModeMap& osg::State::getOrCreateTextureModeMap ( unsigned int  unit)
inlineprotected

Definition at line 1887 of file State.h.

const osg::Matrix& osg::State::getProjectionMatrix ( ) const
inline

Definition at line 262 of file State.h.

osg::Uniform* osg::State::getProjectionMatrixUniform ( )
inline

Definition at line 277 of file State.h.

Here is the call graph for this function:

const VertexAttribAlias& osg::State::getSecondaryColorAlias ( )
inline

Definition at line 307 of file State.h.

ShaderComposer* osg::State::getShaderComposer ( )
inline

Get the ShaderComposor object.

Definition at line 195 of file State.h.

const ShaderComposer* osg::State::getShaderComposer ( ) const
inline

Get the const ShaderComposor object.

Definition at line 198 of file State.h.

bool osg::State::getShaderCompositionEnabled ( ) const
inline

Definition at line 189 of file State.h.

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.

Definition at line 1514 of file State.h.

StateSetStack& osg::State::getStateSetStack ( )
inline

Get the StateSet stack.

Definition at line 237 of file State.h.

unsigned int osg::State::getStateSetStackSize ( )
inline

Get the number of StateSet's on the StateSet stack.

Definition at line 229 of file State.h.

const VertexAttribAliasList& osg::State::getTexCoordAliasList ( )
inline

Definition at line 315 of file State.h.

const TextureAttributeMapList& osg::State::getTextureAttributeMapList ( ) const
inline

Definition at line 1635 of file State.h.

const TextureModeMapList& osg::State::getTextureModeMapList ( ) const
inline

Definition at line 1634 of file State.h.

int osg::State::getTimestampBits ( ) const
inline

Definition at line 1529 of file State.h.

GLint osg::State::getUniformLocation ( unsigned int  uniformNameID) const
inline

Definition at line 1367 of file State.h.

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.

Definition at line 1376 of file State.h.

const UniformMap& osg::State::getUniformMap ( ) const
inline

Definition at line 1631 of file State.h.

bool osg::State::getUseModelViewAndProjectionUniforms ( ) const
inline

Definition at line 270 of file State.h.

bool osg::State::getUseVertexAttributeAliasing ( ) const
inline

Definition at line 286 of file State.h.

const VertexAttribAlias& osg::State::getVertexAlias ( )
inline

Definition at line 295 of file State.h.

Polytope osg::State::getViewFrustum ( ) const
void osg::State::glDrawArraysInstanced ( GLenum  mode,
GLint  first,
GLsizei  count,
GLsizei  primcount 
)
inline

Definition at line 573 of file State.h.

void osg::State::glDrawElementsInstanced ( GLenum  mode,
GLsizei  count,
GLenum  type,
const GLvoid *  indices,
GLsizei  primcount 
)
inline

Definition at line 579 of file State.h.

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

Definition at line 1000 of file State.h.

bool osg::State::isSecondaryColorSupported ( ) const
inline

Definition at line 933 of file State.h.

bool osg::State::isVertexBufferObjectSupported ( ) const
inline

Definition at line 1355 of file State.h.

Here is the caller graph for this function:

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

Definition at line 628 of file State.h.

void osg::State::Normal ( float  x,
float  y,
float  z 
)
inline

Definition at line 606 of file State.h.

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 
)
inlineprotected

Definition at line 2137 of file State.h.

void osg::State::popDefineList ( DefineMap uniformMap,
const StateSet::DefineList defineList 
)
inlineprotected

Definition at line 2168 of file State.h.

void osg::State::popModeList ( ModeMap modeMap,
const StateSet::ModeList modeList 
)
inlineprotected

Definition at line 2121 of file State.h.

void osg::State::popStateSet ( )

Pop stateset off state stack.

Here is the caller graph for this function:

void osg::State::popStateSetStackToSize ( unsigned int  size)
inline

Pop StateSet's for the StateSet stack till its size equals the specified size.

Definition at line 232 of file State.h.

void osg::State::popUniformList ( UniformMap uniformMap,
const StateSet::UniformList uniformList 
)
inlineprotected

Definition at line 2153 of file State.h.

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 
)
inlineprotected

Definition at line 2025 of file State.h.

void osg::State::pushDefineList ( DefineMap defineMap,
const StateSet::DefineList defineList 
)
inlineprotected

Definition at line 2083 of file State.h.

void osg::State::pushModeList ( ModeMap modeMap,
const StateSet::ModeList modeList 
)
inlineprotected

Definition at line 1998 of file State.h.

void osg::State::pushStateSet ( const StateSet dstate)

Push stateset onto state stack.

Here is the caller graph for this function:

void osg::State::pushUniformList ( UniformMap uniformMap,
const StateSet::UniformList uniformList 
)
inlineprotected

Definition at line 2055 of file State.h.

void osg::State::releaseGLObjects ( )

Release all OpenGL objects associated cached by this osg::State object.

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::resetVertexAttributeAlias ( bool  compactAliasing = true,
unsigned int  numTextureUnits = 8 
)

Reset the vertex attribute aliasing to osg's default. This method needs to be called before render anything unless you really know what you're doing !

void osg::State::setAbortRenderingPtr ( bool *  abortPtr)
inline

Set flag for early termination of the draw traversal.

Definition at line 1409 of file State.h.

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.

Definition at line 2928 of file State.h.

Here is the call graph for this function:

void osg::State::setAttributeBindingList ( const Program::AttribBindingList attribBindingList)
inline

Set the vertex attribute binding list. This method needs to be called before render anything unless you really know what you're doing !

Definition at line 318 of file State.h.

void osg::State::setCheckForGLErrors ( CheckForGLErrors  check)
inline

Set whether and how often OpenGL errors should be checked for.

Definition at line 1477 of file State.h.

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::setColorAlias ( const VertexAttribAlias alias)
inline

Set the vertex attribute aliasing for "color". This method needs to be called before render anything unless you really know what you're doing !

Definition at line 302 of file State.h.

void osg::State::setColorPointer ( const Array array)
inline

Set the color pointer using an osg::Array, and manage any VBO that are required.

Definition at line 841 of file State.h.

Here is the call graph for this function:

void osg::State::setColorPointer ( GLint  size,
GLenum  type,
GLsizei  stride,
const GLvoid *  ptr,
GLboolean  normalized = GL_TRUE 
)
inline

wrapper around glEnableClientState(GL_COLOR_ARRAY);glColorPointer(..); note, only updates values that change.

Definition at line 862 of file State.h.

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

Definition at line 148 of file State.h.

Here is the caller graph for this function:

void osg::State::setCurrentElementBufferObject ( osg::GLBufferObject ebo)
inline

Definition at line 526 of file State.h.

void osg::State::setCurrentPixelBufferObject ( osg::GLBufferObject pbo)
inline

Definition at line 544 of file State.h.

void osg::State::setCurrentVertexBufferObject ( osg::GLBufferObject vbo)
inline

Definition at line 509 of file State.h.

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.

Definition at line 1401 of file State.h.

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.

Definition at line 1428 of file State.h.

void osg::State::setDynamicObjectRenderingCompletedCallback ( DynamicObjectRenderingCompletedCallback cb)
inline

Set the callback to be called when the dynamic object count hits 0.

Definition at line 1422 of file State.h.

void osg::State::setFogCoordAlias ( const VertexAttribAlias alias)
inline

Set the vertex attribute aliasing for "fog coord". This method needs to be called before render anything unless you really know what you're doing !

Definition at line 310 of file State.h.

void osg::State::setFogCoordPointer ( const Array array)
inline

Set the fog coord pointer using an osg::Array, and manage any VBO that are required.

Definition at line 1004 of file State.h.

Here is the call graph for this function:

void osg::State::setFogCoordPointer ( GLenum  type,
GLsizei  stride,
const GLvoid *  ptr,
GLboolean  normalized = GL_FALSE 
)

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.

Definition at line 1389 of file State.h.

void osg::State::setGlobalDefaultAttribute ( const StateAttribute attribute)
inline

Definition at line 402 of file State.h.

Here is the call graph for this function:

void osg::State::setGlobalDefaultModeValue ( StateAttribute::GLMode  mode,
bool  enabled 
)
inline

Definition at line 352 of file State.h.

void osg::State::setGlobalDefaultTextureAttribute ( unsigned int  unit,
const StateAttribute attribute 
)
inline

Definition at line 422 of file State.h.

Here is the call graph for this function:

void osg::State::setGlobalDefaultTextureModeValue ( unsigned int  unit,
StateAttribute::GLMode  mode,
bool  enabled 
)
inline

Definition at line 380 of file State.h.

void osg::State::setGpuTimestamp ( Timer_t  tick,
GLuint64  timestamp 
)
inline

Definition at line 1524 of file State.h.

void osg::State::setGraphicsContext ( GraphicsContext context)
inline

Set the graphics context associated with that owns this State object.

Definition at line 124 of file State.h.

Here is the caller graph for this function:

void osg::State::setGraphicsCostEstimator ( GraphicsCostEstimator gce)
inline

Set the helper class that provides applications with estimate on how much different graphics operations will cost.

Definition at line 1500 of file State.h.

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

Definition at line 1358 of file State.h.

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.

Definition at line 338 of file State.h.

void osg::State::setNormalAlias ( const VertexAttribAlias alias)
inline

Set the vertex attribute aliasing for "normal". This method needs to be called before render anything unless you really know what you're doing !

Definition at line 298 of file State.h.

void osg::State::setNormalPointer ( const Array array)
inline

Set the normal pointer using an osg::Array, and manage any VBO that are required.

Definition at line 750 of file State.h.

Here is the call graph for this function:

void osg::State::setNormalPointer ( GLenum  type,
GLsizei  stride,
const GLvoid *  ptr,
GLboolean  normalized = GL_FALSE 
)
inline

wrapper around glEnableClientState(GL_NORMAL_ARRAY);glNormalPointer(..); note, only updates values that change.

Definition at line 770 of file State.h.

void osg::State::setSecondaryColorAlias ( const VertexAttribAlias alias)
inline

Set the vertex attribute aliasing for "secondary color". This method needs to be called before render anything unless you really know what you're doing !

Definition at line 306 of file State.h.

void osg::State::setSecondaryColorPointer ( const Array array)
inline

Set the secondary color pointer using an osg::Array, and manage any VBO that are required.

Definition at line 937 of file State.h.

Here is the call graph for this function:

void osg::State::setSecondaryColorPointer ( GLint  size,
GLenum  type,
GLsizei  stride,
const GLvoid *  ptr,
GLboolean  normalized = GL_TRUE 
)

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.

Definition at line 192 of file State.h.

void osg::State::setShaderCompositionEnabled ( bool  flag)
inline

Definition at line 186 of file State.h.

void osg::State::setStartTick ( Timer_t  tick)
inline

Definition at line 1515 of file State.h.

void osg::State::setTexCoordAliasList ( const VertexAttribAliasList aliasList)
inline

Set the vertex attribute aliasing list for texture coordinates. This method needs to be called before render anything unless you really know what you're doing !

Definition at line 314 of file State.h.

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.

Definition at line 1071 of file State.h.

Here is the call graph for this function:

void osg::State::setTexCoordPointer ( unsigned int  unit,
GLint  size,
GLenum  type,
GLsizei  stride,
const GLvoid *  ptr,
GLboolean  normalized = GL_FALSE 
)
inline

wrapper around glEnableClientState(GL_TEXTURE_COORD_ARRAY);glTexCoordPointer(..); note, only updates values that change.

Definition at line 1091 of file State.h.

void osg::State::setTimestampBits ( int  bits)
inline

Definition at line 1530 of file State.h.

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

Definition at line 269 of file State.h.

void osg::State::setUseVertexAttributeAliasing ( bool  flag)
inline

Definition at line 285 of file State.h.

void osg::State::setVertexAlias ( const VertexAttribAlias alias)
inline

Set the vertex attribute aliasing for "vertex". This method needs to be called before render anything unless you really know what you're doing !

Definition at line 294 of file State.h.

void osg::State::setVertexAttribIPointer ( unsigned int  unit,
const Array array 
)
inline

Set the vertex attrib pointer using an osg::Array, and manage any VBO that are required.

Definition at line 1292 of file State.h.

Here is the call graph for this function:

void osg::State::setVertexAttribIPointer ( unsigned int  index,
GLint  size,
GLenum  type,
GLsizei  stride,
const GLvoid *  ptr 
)

wrapper around glEnableVertexAttribArrayARB(index);glVertexAttribIPointer(..); note, only updates values that change.

void osg::State::setVertexAttribLPointer ( unsigned int  unit,
const Array array 
)
inline

Set the vertex attrib pointer using an osg::Array, and manage any VBO that are required.

Definition at line 1273 of file State.h.

Here is the call graph for this function:

void osg::State::setVertexAttribLPointer ( unsigned int  index,
GLint  size,
GLenum  type,
GLsizei  stride,
const GLvoid *  ptr 
)

wrapper around glEnableVertexAttribArrayARB(index);glVertexAttribLPointer(..); note, only updates values that change.

void osg::State::setVertexAttribPointer ( unsigned int  unit,
const Array array 
)
inline

Set the vertex attrib pointer using an osg::Array, and manage any VBO that are required.

Definition at line 1254 of file State.h.

Here is the call graph for this function:

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.

Definition at line 658 of file State.h.

Here is the call graph for this function:

void osg::State::setVertexPointer ( GLint  size,
GLenum  type,
GLsizei  stride,
const GLvoid *  ptr,
GLboolean  normalized = GL_FALSE 
)
inline

wrapper around glEnableClientState(GL_VERTEX_ARRAY);glVertexPointer(..); note, only updates values that change.

Definition at line 678 of file State.h.

bool osg::State::supportsShaderRequirement ( const std::string &  shaderRequirement)
bool osg::State::supportsShaderRequirements ( const osg::ShaderDefines shaderRequirements)
void osg::State::TexCoord ( float  x,
float  y = 0.0f,
float  z = 0.0f,
float  w = 1.0f 
)
inline

Definition at line 616 of file State.h.

void osg::State::unbindElementBufferObject ( )
inline

Definition at line 537 of file State.h.

void osg::State::unbindPixelBufferObject ( )
inline

Definition at line 557 of file State.h.

void osg::State::unbindVertexBufferObject ( )
inline

Definition at line 519 of file State.h.

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

Definition at line 640 of file State.h.

void osg::State::Vertex ( float  x,
float  y,
float  z,
float  w = 1.0f 
)
inline

Definition at line 586 of file State.h.

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 VertexAttribIPointerProc)
protected
typedef osg::State::void ( GL_APIENTRY VertexAttribLPointerProc)
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

Member Data Documentation

bool* osg::State::_abortRenderingPtr
protected

Definition at line 1672 of file State.h.

ArrayDispatchers osg::State::_arrayDispatchers
protected

Definition at line 1988 of file State.h.

Program::AttribBindingList osg::State::_attributeBindingList
protected

Definition at line 1684 of file State.h.

AttributeMap osg::State::_attributeMap
protected

Definition at line 1841 of file State.h.

CheckForGLErrors osg::State::_checkGLErrors
protected

Definition at line 1673 of file State.h.

VertexAttribAlias osg::State::_colorAlias
protected

Definition at line 1679 of file State.h.

EnabledArrayPair osg::State::_colorArray
protected

Definition at line 1874 of file State.h.

osg::ref_ptr<DynamicObjectRenderingCompletedCallback> osg::State::_completeDynamicObjectRenderingCallback
protected

Definition at line 1985 of file State.h.

unsigned int osg::State::_contextID
protected

Definition at line 1646 of file State.h.

unsigned int osg::State::_currentActiveTextureUnit
protected

Definition at line 1880 of file State.h.

unsigned int osg::State::_currentClientActiveTextureUnit
protected

Definition at line 1881 of file State.h.

GLBufferObject* osg::State::_currentEBO
protected

Definition at line 1883 of file State.h.

GLBufferObject* osg::State::_currentPBO
protected

Definition at line 1884 of file State.h.

osg::Program* osg::State::_currentShaderCompositionProgram
protected

Definition at line 1651 of file State.h.

StateSet::UniformList osg::State::_currentShaderCompositionUniformList
protected

Definition at line 1652 of file State.h.

GLBufferObject* osg::State::_currentVBO
protected

Definition at line 1882 of file State.h.

DefineMap osg::State::_defineMap
protected

Definition at line 1843 of file State.h.

ref_ptr<DisplaySettings> osg::State::_displaySettings
protected

Definition at line 1670 of file State.h.

unsigned int osg::State::_dynamicObjectCount
protected

Definition at line 1984 of file State.h.

ExtensionMap osg::State::_extensionMap

Definition at line 156 of file State.h.

bool osg::State::_extensionProcsInitialized
protected

Definition at line 1963 of file State.h.

EnabledArrayPair osg::State::_fogArray
protected

Definition at line 1876 of file State.h.

VertexAttribAlias osg::State::_fogCoordAlias
protected

Definition at line 1681 of file State.h.

ref_ptr<FrameStamp> osg::State::_frameStamp
protected

Definition at line 1654 of file State.h.

ActiveTextureProc osg::State::_glActiveTexture
protected

Definition at line 1967 of file State.h.

GLBeginEndAdapter osg::State::_glBeginEndAdapter
protected

Definition at line 1987 of file State.h.

BindBufferProc osg::State::_glBindBuffer
protected

Definition at line 1978 of file State.h.

ActiveTextureProc osg::State::_glClientActiveTexture
protected

Definition at line 1966 of file State.h.

DisableVertexAttribProc osg::State::_glDisableVertexAttribArray
protected

Definition at line 1977 of file State.h.

DrawArraysInstancedProc osg::State::_glDrawArraysInstanced
protected

Definition at line 1979 of file State.h.

DrawElementsInstancedProc osg::State::_glDrawElementsInstanced
protected

Definition at line 1980 of file State.h.

EnableVertexAttribProc osg::State::_glEnableVertexAttribArray
protected

Definition at line 1976 of file State.h.

osg::ref_ptr<GLExtensions> osg::State::_glExtensions
protected

Definition at line 1982 of file State.h.

FogCoordPointerProc osg::State::_glFogCoordPointer
protected

Definition at line 1971 of file State.h.

GLint osg::State::_glMaxTextureCoords
protected

Definition at line 1964 of file State.h.

GLint osg::State::_glMaxTextureUnits
protected

Definition at line 1965 of file State.h.

MultiTexCoord4fProc osg::State::_glMultiTexCoord4f
protected

Definition at line 1968 of file State.h.

SecondaryColorPointerProc osg::State::_glSecondaryColorPointer
protected

Definition at line 1972 of file State.h.

VertexAttrib4fProc osg::State::_glVertexAttrib4f
protected

Definition at line 1969 of file State.h.

VertexAttrib4fvProc osg::State::_glVertexAttrib4fv
protected

Definition at line 1970 of file State.h.

VertexAttribIPointerProc osg::State::_glVertexAttribIPointer
protected

Definition at line 1974 of file State.h.

VertexAttribLPointerProc osg::State::_glVertexAttribLPointer
protected

Definition at line 1975 of file State.h.

VertexAttribPointerProc osg::State::_glVertexAttribPointer
protected

Definition at line 1973 of file State.h.

Timer_t osg::State::_gpuTick
protected

Definition at line 1993 of file State.h.

GLuint64 osg::State::_gpuTimestamp
protected

Definition at line 1994 of file State.h.

GraphicsContext* osg::State::_graphicsContext
protected

Definition at line 1645 of file State.h.

osg::ref_ptr<GraphicsCostEstimator> osg::State::_graphicsCostEstimator
protected

Definition at line 1990 of file State.h.

ref_ptr<const RefMatrix> osg::State::_identity
protected

Definition at line 1656 of file State.h.

Matrix osg::State::_initialInverseViewMatrix
protected

Definition at line 1668 of file State.h.

ref_ptr<const RefMatrix> osg::State::_initialViewMatrix
protected

Definition at line 1657 of file State.h.

bool osg::State::_isFogCoordSupported
mutableprotected

Definition at line 1940 of file State.h.

bool osg::State::_isFogCoordSupportResolved
mutableprotected

Definition at line 1939 of file State.h.

bool osg::State::_isSecondaryColorSupported
mutableprotected

Definition at line 1936 of file State.h.

bool osg::State::_isSecondaryColorSupportResolved
mutableprotected

Definition at line 1935 of file State.h.

bool osg::State::_isVertexBufferObjectSupported
mutableprotected

Definition at line 1944 of file State.h.

bool osg::State::_isVertexBufferObjectSupportResolved
mutableprotected

Definition at line 1943 of file State.h.

const Program::PerContextProgram* osg::State::_lastAppliedProgramObject
protected

Definition at line 1848 of file State.h.

unsigned int osg::State::_maxBufferObjectPoolSize
protected

Definition at line 1853 of file State.h.

unsigned int osg::State::_maxTexturePoolSize
protected

Definition at line 1852 of file State.h.

ref_ptr<const RefMatrix> osg::State::_modelView
protected

Definition at line 1659 of file State.h.

ref_ptr<RefMatrix> osg::State::_modelViewCache
protected

Definition at line 1660 of file State.h.

ref_ptr<Uniform> osg::State::_modelViewMatrixUniform
protected

Definition at line 1663 of file State.h.

ref_ptr<Uniform> osg::State::_modelViewProjectionMatrixUniform
protected

Definition at line 1665 of file State.h.

ModeMap osg::State::_modeMap
protected

Definition at line 1840 of file State.h.

VertexAttribAlias osg::State::_normalAlias
protected

Definition at line 1678 of file State.h.

EnabledArrayPair osg::State::_normalArray
protected

Definition at line 1873 of file State.h.

ref_ptr<Uniform> osg::State::_normalMatrixUniform
protected

Definition at line 1666 of file State.h.

ref_ptr<const RefMatrix> osg::State::_projection
protected

Definition at line 1658 of file State.h.

ref_ptr<Uniform> osg::State::_projectionMatrixUniform
protected

Definition at line 1664 of file State.h.

IndicesGLuint osg::State::_quadIndicesGLuint[4]

Definition at line 569 of file State.h.

IndicesGLushort osg::State::_quadIndicesGLushort[4]

Definition at line 566 of file State.h.

VertexAttribAlias osg::State::_secondaryColorAlias
protected

Definition at line 1680 of file State.h.

EnabledArrayPair osg::State::_secondaryColorArray
protected

Definition at line 1875 of file State.h.

osg::ref_ptr<ShaderComposer> osg::State::_shaderComposer
protected

Definition at line 1650 of file State.h.

bool osg::State::_shaderCompositionDirty
protected

Definition at line 1649 of file State.h.

bool osg::State::_shaderCompositionEnabled
protected

Definition at line 1648 of file State.h.

Timer_t osg::State::_startTick
protected

Definition at line 1992 of file State.h.

StateSetStack osg::State::_stateStateStack
protected

Definition at line 1850 of file State.h.

VertexAttribAliasList osg::State::_texCoordAliasList
protected

Definition at line 1682 of file State.h.

EnabledTexCoordArrayList osg::State::_texCoordArrayList
protected

Definition at line 1877 of file State.h.

TextureAttributeMapList osg::State::_textureAttributeMapList
protected

Definition at line 1846 of file State.h.

TextureModeMapList osg::State::_textureModeMapList
protected

Definition at line 1845 of file State.h.

int osg::State::_timestampBits
protected

Definition at line 1995 of file State.h.

UniformMap osg::State::_uniformMap
protected

Definition at line 1842 of file State.h.

bool osg::State::_useModelViewAndProjectionUniforms
protected

Definition at line 1662 of file State.h.

bool osg::State::_useVertexAttributeAliasing
protected

Definition at line 1676 of file State.h.

VertexAttribAlias osg::State::_vertexAlias
protected

Definition at line 1677 of file State.h.

EnabledArrayPair osg::State::_vertexArray
protected

Definition at line 1872 of file State.h.

EnabledVertexAttribArrayList osg::State::_vertexAttribArrayList
protected

Definition at line 1878 of file State.h.

typedef osg::State::GLenum
protected

Definition at line 1953 of file State.h.

typedef osg::State::GLint
protected

Definition at line 1953 of file State.h.


The documentation for this class was generated from the following file: