42#define GL_TEXTURE0 0x84C0
49#define OSG_GL_DEBUG(message) \
50 if (state.getFineGrainedErrorDetection()) \
52 GLenum errorNo = glGetError(); \
53 if (errorNo!=GL_NO_ERROR) \
55 osg::notify(WARN)<<"Warning: detected OpenGL error '"<<gluErrorString(errorNo)<<" "<<message<<endl; \
118 typedef std::map<const std::type_info*, osg::ref_ptr<osg::Referenced> >
ExtensionMap;
126 const std::type_info* id(&
typeid(T));
132 return static_cast<T*
>(ptr.
get());
141 const std::type_info* id(&
typeid(T));
144 else return itr->second.get();
151 const std::type_info* id(&
typeid(T));
177 up.first =
const_cast<Uniform*
>(uniform);
338 return _modeMap[mode].global_default_value;
343 return _modeMap[mode].last_applied_value;
646 void drawQuads(GLint first, GLsizei count, GLsizei primCount=0);
651 else glDrawArrays(mode, first, count);
657 else glDrawElements(mode, count, type, indices);
661 inline void Vertex(
float x,
float y,
float z,
float w=1.0f)
663 #if defined(OSG_GL_VERTEX_FUNCS_AVAILABLE) && !defined(OSG_GLES1_AVAILABLE)
665 else glVertex4f(x,y,z,w);
671 inline void Color(
float r,
float g,
float b,
float a=1.0f)
673 #ifdef OSG_GL_VERTEX_FUNCS_AVAILABLE
675 else glColor4f(r,g,b,a);
683 #ifdef OSG_GL_VERTEX_FUNCS_AVAILABLE
685 else glNormal3f(x,y,z);
691 void TexCoord(
float x,
float y=0.0f,
float z=0.0f,
float w=1.0f)
693 #if !defined(OSG_GLES1_AVAILABLE)
694 #ifdef OSG_GL_VERTEX_FUNCS_AVAILABLE
696 else glTexCoord4f(x,y,z,w);
703 void MultiTexCoord(
unsigned int unit,
float x,
float y=0.0f,
float z=0.0f,
float w=1.0f)
705 #if !defined(OSG_GLES1_AVAILABLE)
706 #ifdef OSG_GL_VERTEX_FUNCS_AVAILABLE
715 void VerteAttrib(
unsigned int location,
float x,
float y=0.0f,
float z=0.0f,
float w=0.0f)
724 void setInterleavedArrays( GLenum format, GLsizei stride,
const GLvoid* pointer) {
_vas->setInterleavedArrays( *
this, format, stride, pointer); }
728 inline void setVertexPointer(GLint size, GLenum type, GLsizei stride,
const GLvoid *ptr, GLboolean normalized=GL_FALSE) {
_vas->setVertexArray( *
this, size, type, stride, ptr, normalized); }
733 inline void setNormalPointer( GLenum type, GLsizei stride,
const GLvoid *ptr, GLboolean normalized=GL_FALSE ) {
_vas->setNormalArray( *
this, type, stride, ptr, normalized); }
737 inline void setColorPointer( GLint size, GLenum type, GLsizei stride,
const GLvoid *ptr, GLboolean normalized=GL_TRUE ) {
_vas->setColorArray(*
this, size, type, stride, ptr, normalized); }
750 inline void setTexCoordPointer(
unsigned int unit, GLint size, GLenum type, GLsizei stride,
const GLvoid *ptr, GLboolean normalized=GL_FALSE ) {
_vas->setTexCoordArray(*
this, unit, size, type, stride, ptr, normalized); }
764 inline bool setActiveTextureUnit(
unsigned int unit );
817 typedef std::pair<const StateAttribute*,StateAttribute::OverrideValue>
AttributePair;
930 void print(std::ostream& fout)
const;
978 typedef std::vector<StateAttribute::GLModeValue>
ValueVec;
988 void print(std::ostream& fout)
const;
1021 typedef std::pair<const Uniform*,StateAttribute::OverrideValue>
UniformPair;
1058 typedef std::map<StateAttribute::GLMode,ModeStack>
ModeMap;
1061 typedef std::map<StateAttribute::TypeMemberPair,AttributeStack>
AttributeMap;
1149 if (enabled) glEnable(mode);
1150 else glDisable(mode);
1168 if (enabled) glEnable(mode);
1169 else glDisable(mode);
1190 attribute->
apply(*
this);
1216 attribute->
apply(*
this);
1338 inline void applyModeMap(ModeMap& modeMap);
1339 inline void applyAttributeMap(AttributeMap& attributeMap);
1340 inline void applyUniformMap(UniformMap& uniformMap);
1342 inline void applyModeListOnTexUnit(
unsigned int unit,ModeMap& modeMap,
const StateSet::ModeList& modeList);
1343 inline void applyAttributeListOnTexUnit(
unsigned int unit,AttributeMap& attributeMap,
const StateSet::AttributeList& attributeList);
1345 inline void applyModeMapOnTexUnit(
unsigned int unit,ModeMap& modeMap);
1346 inline void applyAttributeMapOnTexUnit(
unsigned int unit,AttributeMap& attributeMap);
1369 typedef void (GL_APIENTRY *
VertexAttrib4fProc)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
1371 typedef void (GL_APIENTRY *
VertexAttribPointerProc) (
unsigned int, GLint, GLenum, GLboolean normalized, GLsizei stride,
const GLvoid *pointer);
1379 typedef void (GL_APIENTRY *
DrawElementsInstancedProc)( GLenum mode, GLsizei count, GLenum type,
const GLvoid *indices, GLsizei primcount );
1417 for(StateSet::ModeList::const_iterator mitr=modeList.begin();
1418 mitr!=modeList.end();
1426 ms.
valueVec.push_back(mitr->second);
1436 ms.
valueVec.push_back(mitr->second);
1444 for(StateSet::AttributeList::const_iterator aitr=attributeList.begin();
1445 aitr!=attributeList.end();
1454 AttributePair(aitr->second.first.get(),aitr->second.second));
1465 AttributePair(aitr->second.first.get(),aitr->second.second));
1474 for(StateSet::UniformList::const_iterator aitr=uniformList.begin();
1475 aitr!=uniformList.end();
1502 for(StateSet::DefineList::const_iterator aitr=defineList.begin();
1503 aitr!=defineList.end();
1528 bool changed = (dv[dv.size()-2] != dv.back());
1540 for(StateSet::ModeList::const_iterator mitr=modeList.begin();
1541 mitr!=modeList.end();
1556 for(StateSet::AttributeList::const_iterator aitr=attributeList.begin();
1557 aitr!=attributeList.end();
1572 for(StateSet::UniformList::const_iterator aitr=uniformList.begin();
1573 aitr!=uniformList.end();
1587 for(StateSet::DefineList::const_iterator aitr=defineList.begin();
1588 aitr!=defineList.end();
1597 if ((dv.size() < 2) || (dv[dv.size()-2] != dv.back()))
1609 StateSet::ModeList::const_iterator ds_mitr = modeList.begin();
1610 ModeMap::iterator this_mitr=modeMap.begin();
1612 while (this_mitr!=modeMap.end() && ds_mitr!=modeList.end())
1614 if (this_mitr->first<ds_mitr->first)
1625 applyMode(this_mitr->first,new_value,ms);
1639 else if (ds_mitr->first<this_mitr->first)
1644 ModeStack& ms = modeMap[ds_mitr->first];
1670 applyMode(this_mitr->first,new_value,ms);
1678 if (
applyMode(ds_mitr->first,new_value,ms))
1691 this_mitr!=modeMap.end();
1702 applyMode(this_mitr->first,new_value,ms);
1716 ds_mitr!=modeList.end();
1719 ModeStack& ms = modeMap[ds_mitr->first];
1731 StateSet::ModeList::const_iterator ds_mitr = modeList.begin();
1732 ModeMap::iterator this_mitr=modeMap.begin();
1734 while (this_mitr!=modeMap.end() && ds_mitr!=modeList.end())
1736 if (this_mitr->first<ds_mitr->first)
1761 else if (ds_mitr->first<this_mitr->first)
1766 ModeStack& ms = modeMap[ds_mitr->first];
1813 this_mitr!=modeMap.end();
1838 ds_mitr!=modeList.end();
1841 ModeStack& ms = modeMap[ds_mitr->first];
1853 StateSet::AttributeList::const_iterator ds_aitr=attributeList.begin();
1855 AttributeMap::iterator this_aitr=attributeMap.begin();
1857 while (this_aitr!=attributeMap.end() && ds_aitr!=attributeList.end())
1859 if (this_aitr->first<ds_aitr->first)
1881 else if (ds_aitr->first<this_aitr->first)
1931 this_aitr!=attributeMap.end();
1953 ds_aitr!=attributeList.end();
1971 StateSet::AttributeList::const_iterator ds_aitr=attributeList.begin();
1973 AttributeMap::iterator this_aitr=attributeMap.begin();
1975 while (this_aitr!=attributeMap.end() && ds_aitr!=attributeList.end())
1977 if (this_aitr->first<ds_aitr->first)
1999 else if (ds_aitr->first<this_aitr->first)
2049 this_aitr!=attributeMap.end();
2071 ds_aitr!=attributeList.end();
2091 StateSet::UniformList::const_iterator ds_aitr=uniformList.begin();
2093 UniformMap::iterator this_aitr=uniformMap.begin();
2095 while (this_aitr!=uniformMap.end() && ds_aitr!=uniformList.end())
2097 if (this_aitr->first<ds_aitr->first)
2109 else if (ds_aitr->first<this_aitr->first)
2140 this_aitr!=uniformMap.end();
2153 ds_aitr!=uniformList.end();
2163 StateSet::DefineList::const_iterator dl_itr = defineList.begin();
2164 DefineMap::DefineStackMap::iterator dm_itr = defineMap.
map.begin();
2169 while (dm_itr!=defineMap.
map.end() && dl_itr!=defineList.end())
2171 if (dm_itr->first<dl_itr->first)
2179 else if (dl_itr->first<dm_itr->first)
2211 dm_itr!=defineMap.
map.end();
2222 dl_itr!=defineList.end();
2231 for(ModeMap::iterator mitr=modeMap.begin();
2232 mitr!=modeMap.end();
2257 for(ModeMap::iterator mitr=modeMap.begin();
2258 mitr!=modeMap.end();
2283 for(AttributeMap::iterator aitr=attributeMap.begin();
2284 aitr!=attributeMap.end();
2307 for(AttributeMap::iterator aitr=attributeMap.begin();
2308 aitr!=attributeMap.end();
2333 for(UniformMap::iterator aitr=uniformMap.begin();
2334 aitr!=uniformMap.end();
#define GL_PIXEL_UNPACK_BUFFER_ARB
Definition BufferObject:85
#define GL_DRAW_INDIRECT_BUFFER
Definition GLDefines:438
#define GL_TEXTURE0
Definition State:42
The core osg library provides the basic scene graph classes such as Nodes, State and Drawables,...
Definition AlphaFunc:19
Matrixd Matrix
Definition Matrix:27
T maximum(T lhs, T rhs)
return the maximum of two values, equivalent to std::max.
Definition Math:85
unsigned long long Timer_t
Definition Timer:24
RefMatrixd RefMatrix
Definition Matrix:28
std::set< std::string > ShaderDefines
Definition Shader:37
Helper class for managing the dispatch to OpenGL of various attribute arrays such as stored in osg::G...
Definition AttributeDispatchers:35
Definition BufferObject:164
void bindBuffer()
Definition BufferObject:771
bool isDirty() const
Definition BufferObject:222
DisplaySettings class for encapsulating what visuals are required and have been set up,...
Definition DisplaySettings:34
static ref_ptr< DisplaySettings > & instance()
Maintain a DisplaySettings singleton for objects to query at runtime.
Class which encapsulates the frame number, reference time and calendar time of specific frame,...
Definition FrameStamp:35
Definition GLExtensions:135
Main GLExtensions class for managing OpenGL extensions per graphics context.
Definition GLExtensions:160
Base class for providing Windowing API agnostic access to creating and managing graphics context.
Definition GraphicsContext:30
Definition GraphicsCostEstimator:108
virtual StateAttribute * asStateAttribute()
Convert 'this' into a StateAttribute pointer if Object is a StateAttribute, otherwise return 0.
Definition Object:127
const std::string & getName() const
Get the name of object.
Definition Object:213
A Polytope class for representing convex clipping volumes made up of a set of planes.
Definition Polytope:26
osg::Program is an application-level abstraction of an OpenGL glProgram.
Definition Program:52
std::map< std::string, GLuint > AttribBindingList
Definition Program:217
PerContextProgram (PCP) is an OSG-internal encapsulation of glPrograms per-GL context.
Definition Program:264
Smart pointer for handling referenced counted objects.
Definition ref_ptr:32
T * get() const
Definition ref_ptr:117
Base class for providing reference counted objects.
Definition Referenced:44
deprecated
Definition ShaderComposer:30
Encapsulates the current applied OpenGL modes, attributes and vertex arrays settings,...
Definition State:80
unsigned int getContextID() const
Get the current OpenGL context unique ID.
Definition State:114
GLBufferObject * _currentDIBO
Definition State:1306
void releaseGLObjects()
Release all OpenGL objects associated cached by this osg::State object.
unsigned int getMaxBufferObjectPoolSize() const
Definition State:901
const TextureModeMapList & getTextureModeMapList() const
Definition State:1074
virtual void frameCompleted()
called by the GraphicsContext just before GraphicsContext::swapBuffersImplementation().
DefineMap & getDefineMap()
Definition State:1072
bool getLastAppliedMode(StateAttribute::GLMode mode) const
Get whether the current specified mode is enabled (true) or disabled (false).
void applyAttributeMap(AttributeMap &attributeMap)
Definition State:2281
void setCheckForGLErrors(CheckForGLErrors check)
Set whether and how often OpenGL errors should be checked for.
Definition State:920
FrameStamp * getFrameStamp()
Get the frame stamp for the current frame.
Definition State:830
void setContextID(unsigned int contextID)
Set the current OpenGL context uniqueID.
Definition State:111
bool checkGLErrors(const StateAttribute *attribute) const
GraphicsContext * getGraphicsContext()
Get the graphics context associated with that owns this State object.
Definition State:90
void VerteAttrib(unsigned int location, float x, float y=0.0f, float z=0.0f, float w=0.0f)
Definition State:715
AttributeMap _attributeMap
Definition State:1288
void setVertexPointer(const Array *array)
Set the vertex pointer using an osg::Array, and manage any VBO that are required.
Definition State:727
AttributeDispatchers & getAttributeDispatchers()
Get the helper class for dispatching osg::Arrays as OpenGL attribute data.
Definition State:936
DrawElementsInstancedProc _glDrawElementsInstanced
Definition State:1398
void setGraphicsCostEstimator(GraphicsCostEstimator *gce)
Set the helper class that provides applications with estimate on how much different graphics operatio...
Definition State:940
void setCurrentPixelBufferObject(osg::GLBufferObject *pbo)
Definition State:580
void applyModeList(ModeMap &modeMap, const StateSet::ModeList &modeList)
Definition State:1607
bool _useModelViewAndProjectionUniforms
Definition State:1108
void(GL_APIENTRY * MultiTexCoord4fProc)(GLenum target, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
Definition State:1368
void(GL_APIENTRY * DrawArraysInstancedProc)(GLenum mode, GLint first, GLsizei count, GLsizei primcount)
Definition State:1378
bool applyAttributeOnTexUnit(unsigned int unit, const StateAttribute *attribute, AttributeStack &as)
Definition State:1207
Matrix _initialInverseViewMatrix
Definition State:1114
void pushDefineList(DefineMap &defineMap, const StateSet::DefineList &defineList)
Definition State:1500
IndicesGLushort _quadIndicesGLushort[4]
Definition State:641
void setColorAlias(const VertexAttribAlias &alias)
Set the vertex attribute aliasing for "color".
Definition State:272
void popDefineList(DefineMap &uniformMap, const StateSet::DefineList &defineList)
Definition State:1585
bool _isVertexBufferObjectSupported
Definition State:1360
BindBufferProc _glBindBuffer
Definition State:1396
const osg::Matrix & getProjectionMatrix() const
Definition State:232
bool useVertexBufferObject(bool useVBO) const
Definition State:790
std::vector< ref_ptr< const Matrix > > MatrixStack
Definition State:1067
VertexAttribPointerProc _glVertexAttribPointer
Definition State:1391
void applyShaderCompositionUniform(const osg::Uniform *uniform, StateAttribute::OverrideValue value=StateAttribute::ON)
Convenience method for StateAttribute::apply(State&) methods to pass on their uniforms to osg::State ...
Definition State:174
void unbindDrawIndirectBufferObject()
Definition State:623
void applyModelViewAndProjectionUniformsIfRequired()
bool applyMode(StateAttribute::GLMode mode, bool enabled, ModeStack &ms)
Apply an OpenGL mode if required, passing in mode, enable flag and appropriate mode stack.
Definition State:1143
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 disableFogCoordPointer()
Definition State:746
std::string getDefineString(const osg::ShaderDefines &shaderDefines)
void setGlobalDefaultAttribute(const StateAttribute *attribute)
Definition State:431
void applyUniformMap(UniformMap &uniformMap)
Definition State:2329
void resetCurrentVertexArrayStateOnMatch(VertexArrayState *vas)
Reset the CurrentVertexArrayState/VertexArrayObject if it's value matches the specificied vas - use w...
Definition State:553
void setNormalPointer(GLenum type, GLsizei stride, const GLvoid *ptr, GLboolean normalized=GL_FALSE)
Definition State:733
void(GL_APIENTRY * VertexAttribPointerProc)(unsigned int, GLint, GLenum, GLboolean normalized, GLsizei stride, const GLvoid *pointer)
Definition State:1371
T * get()
Get a specific GL extensions object or GraphicsObjectManager, initialize if not already present.
Definition State:124
VertexAttribAlias _colorAlias
Definition State:1125
void(GL_APIENTRY * VertexAttribIPointerProc)(unsigned int, GLint, GLenum, GLsizei stride, const GLvoid *pointer)
Definition State:1372
void popModeList(ModeMap &modeMap, const StateSet::ModeList &modeList)
Definition State:1538
void decrementDynamicObjectCount()
Decrement the number of dynamic objects left to render this frame, and once the count goes to zero ca...
Definition State:888
bool _shaderCompositionDirty
Definition State:1092
ShaderComposer * getShaderComposer()
deprecated.
Definition State:165
bool getUseVertexAttributeAliasing() const
Definition State:256
void setLastAppliedProgramObject(const Program::PerContextProgram *program)
Definition State:796
bool getGlobalDefaultTextureModeValue(unsigned int unit, StateAttribute::GLMode mode)
Definition State:409
const VertexAttribAlias & getNormalAlias()
Definition State:269
void glReadBuffer(GLenum buffer)
void haveAppliedTextureMode(unsigned int unit, StateAttribute::GLMode mode, StateAttribute::GLModeValue value)
texture 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 n...
void setTexCoordPointer(unsigned int unit, GLint size, GLenum type, GLsizei stride, const GLvoid *ptr, GLboolean normalized=GL_FALSE)
Definition State:750
void setCurrentToGlobalVertexArrayState()
Set the getCurrentVertexArrayState to the GlobalVertexArrayState.
Definition State:550
GLenum getDrawBuffer() const
Definition State:308
void setMaxTexturePoolSize(unsigned int size)
void setVertexPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *ptr, GLboolean normalized=GL_FALSE)
Definition State:728
void(GL_APIENTRY * EnableVertexAttribProc)(unsigned int)
Definition State:1374
int _timestampBits
Definition State:1412
ActiveTextureProc _glActiveTexture
Definition State:1385
AttributeMap & getOrCreateTextureAttributeMap(unsigned int unit)
Definition State:1317
void setVertexAttribLPointer(unsigned int unit, const Array *array)
Definition State:778
void setCurrentVertexArrayObject(GLuint vao)
Definition State:630
ref_ptr< const RefMatrix > _projection
Definition State:1104
const GraphicsContext * getGraphicsContext() const
Get the const graphics context associated with that owns this State object.
Definition State:93
int getTimestampBits() const
Definition State:969
void(GL_APIENTRY * VertexAttribLPointerProc)(unsigned int, GLint, GLenum, GLsizei stride, const GLvoid *pointer)
Definition State:1373
DisplaySettings * getActiveDisplaySettings()
Get the DisplaySettings that is current active DisplaySettings to be used by osg::State,...
Definition State:845
bool getModeValidity(StateAttribute::GLMode mode)
Get whether a particular OpenGL mode is valid in the current graphics context.
Definition State:324
void applyUniformList(UniformMap &uniformMap, const StateSet::UniformList &uniformList)
Definition State:2087
void applyModelViewMatrix(const osg::Matrix &)
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 setGlobalDefaultTextureAttribute(unsigned int unit, const StateAttribute *attribute)
Definition State:451
const GLBufferObject * getCurrentVertexBufferObject()
Definition State:568
void haveAppliedAttribute(AttributeMap &attributeMap, const StateAttribute *attribute)
bool getGlobalDefaultModeValue(StateAttribute::GLMode mode)
Definition State:336
VertexAttrib4fvProc _glVertexAttrib4fv
Definition State:1388
CheckForGLErrors getCheckForGLErrors() const
Get whether and how often OpenGL errors should be checked for.
Definition State:923
const TextureAttributeMapList & getTextureAttributeMapList() const
Definition State:1075
void applyModelViewMatrix(const osg::RefMatrix *matrix)
osg::ref_ptr< GLExtensions > _glExtensions
Definition State:1400
void insertStateSet(unsigned int pos, const StateSet *dstate)
Insert stateset onto state stack.
bool getAbortRendering() const
Get flag for early termination of the draw traversal, if true steps should be taken to complete rende...
Definition State:856
bool getLastAppliedTextureModeValue(unsigned int unit, StateAttribute::GLMode mode)
Definition State:424
unsigned int getActiveTextureUnit() const
Get the current texture unit.
Definition State:767
const Program::PerContextProgram * getLastAppliedProgramObject() const
Definition State:803
DefineMap _defineMap
Definition State:1290
ref_ptr< const RefMatrix > _identity
Definition State:1102
void bindVertexArrayObject(GLuint vao)
Definition State:635
bool _isVertexArrayObjectSupported
Definition State:1361
void setColorPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *ptr, GLboolean normalized=GL_TRUE)
Definition State:737
const osg::Matrix & getModelViewMatrix() const
Definition State:237
void setUpVertexAttribAlias(VertexAttribAlias &alias, GLuint location, const std::string glName, const std::string osgName, const std::string &declaration)
void(GL_APIENTRY * VertexAttrib4fvProc)(GLuint index, const GLfloat *v)
Definition State:1370
void setGlobalDefaultTextureModeValue(unsigned int unit, StateAttribute::GLMode mode, bool enabled)
Definition State:402
bool _useVertexAttributeAliasing
Definition State:1122
void(GL_APIENTRY * DrawElementsInstancedProc)(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount)
Definition State:1379
void haveAppliedTextureAttribute(unsigned int unit, const StateAttribute *attribute)
texture Attribute has been applied externally, update state to reflect this setting.
void popStateSet()
Pop stateset off state stack.
void applyAttributeListOnTexUnit(unsigned int unit, AttributeMap &attributeMap, const StateSet::AttributeList &attributeList)
Definition State:1969
void Normal(float x, float y, float z)
Definition State:681
void(GL_APIENTRY * DisableVertexAttribProc)(unsigned int)
Definition State:1375
std::vector< ModeMap > TextureModeMapList
Definition State:1059
bool * _abortRenderingPtr
Definition State:1118
Polytope getViewFrustum() const
std::vector< VertexAttribAlias > VertexAttribAliasList
Definition State:258
bool checkGLErrors(StateAttribute::GLMode mode) const
void lazyDisablingOfVertexAttributes()
Definition State:564
bool setClientActiveTextureUnit(unsigned int unit)
Set the current tex coord array texture unit, return true if selected, false if selection failed such...
void setAbortRenderingPtr(bool *abortPtr)
Set flag for early termination of the draw traversal.
Definition State:852
AttributeVec & getAttributeVec(const osg::StateAttribute *attribute)
Definition State:820
void applyShaderComposition()
Apply any shader composed state.
osg::ref_ptr< ShaderComposer > _shaderComposer
Definition State:1093
void disableVertexAttribPointer(unsigned int index)
Definition State:781
bool getLastAppliedMode(const ModeMap &modeMap, StateAttribute::GLMode mode) const
VertexAttribAlias _secondaryColorAlias
Definition State:1126
bool _shaderCompositionEnabled
Definition State:1091
ref_ptr< RefMatrix > _modelViewCache
Definition State:1106
GLint getAttribLocation(const std::string &name) const
Definition State:815
void popAttributeList(AttributeMap &attributeMap, const StateSet::AttributeList &attributeList)
Definition State:1554
void setTimestampBits(int bits)
Definition State:970
osg::Uniform * getModelViewMatrixUniform()
Definition State:246
const StateAttribute * getGlobalDefaultTextureAttribute(unsigned int unit, StateAttribute::Type type, unsigned int member=0)
Definition State:458
bool supportsShaderRequirement(const std::string &shaderRequirement)
void popAllStateSets()
pop all statesets off state stack, ensuring it is empty ready for the next frame.
void TexCoord(float x, float y=0.0f, float z=0.0f, float w=1.0f)
Definition State:691
void setVertexAttribIPointer(unsigned int unit, const Array *array)
Definition State:779
void bindPixelBufferObject(osg::GLBufferObject *pbo)
Definition State:583
osg::Uniform * getNormalMatrixUniform()
Definition State:249
void haveAppliedAttribute(AttributeMap &attributeMap, StateAttribute::Type type, unsigned int member)
Program::AttribBindingList _attributeBindingList
Definition State:1130
std::pair< const StateAttribute *, StateAttribute::OverrideValue > AttributePair
Definition State:817
void applyAttributeMapOnTexUnit(unsigned int unit, AttributeMap &attributeMap)
Definition State:2305
void popStateSetStackToSize(unsigned int size)
Pop StateSet's for the StateSet stack till its size equals the specified size.
Definition State:202
StateSetStack _stateStateStack
Definition State:1297
GLint _glMaxTextureUnits
Definition State:1383
void removeStateSet(unsigned int pos)
Pop stateset off state stack.
void dirtyAllVertexArrays()
dirty the vertex, normal, color, tex coords, secondary color, fog coord and index arrays.
GLBufferObject * _currentPBO
Definition State:1305
ref_ptr< Uniform > _modelViewProjectionMatrixUniform
Definition State:1111
Timer_t _gpuTick
Definition State:1410
bool applyGlobalDefaultAttributeOnTexUnit(unsigned int unit, AttributeStack &as)
Definition State:1260
void reset()
reset the state object to an empty stack.
StateSet::UniformList & getCurrentShaderCompositionUniformList()
Get the unform list in which to inject any uniforms that StateAttribute::apply(State&) methods provid...
Definition State:171
VertexAttribAlias _fogCoordAlias
Definition State:1127
EnableVertexAttribProc _glEnableVertexAttribArray
Definition State:1394
ref_ptr< const RefMatrix > _modelView
Definition State:1105
GLint getMaxTextureUnits() const
For GL>=2.0 uses GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, for GL<2 uses GL_MAX_TEXTURE_UNITS.
Definition State:758
ModeMap & getOrCreateTextureModeMap(unsigned int unit)
Definition State:1310
void setVertexAlias(const VertexAttribAlias &alias)
Set the vertex attribute aliasing for "vertex".
Definition State:264
void unbindVertexBufferObject()
Definition State:571
void glDrawArraysInstanced(GLenum mode, GLint first, GLsizei count, GLsizei primcount)
Definition State:648
TextureAttributeMapList _textureAttributeMapList
Definition State:1293
void setTexCoordPointer(unsigned int unit, const Array *array)
Definition State:749
const GLBufferObject * getCurrentElementBufferObject()
Definition State:574
void setCurrentVertexArrayState(VertexArrayState *vas)
Set the CurrentVetexArrayState object that take which vertex arrays are bound.
Definition State:544
Timer_t getGpuTick() const
Definition State:956
void popUniformList(UniformMap &uniformMap, const StateSet::UniformList &uniformList)
Definition State:1570
const osg::Matrix & getInitialInverseViewMatrix() const
Definition State:228
void unbindElementBufferObject()
Definition State:577
void haveAppliedAttribute(StateAttribute::Type type, unsigned int member=0)
Attribute has been applied externally, and therefore this attribute type has been dirtied and will ne...
bool supportsShaderRequirements(const osg::ShaderDefines &shaderRequirements)
void haveAppliedMode(ModeMap &modeMap, StateAttribute::GLMode mode, StateAttribute::GLModeValue value)
void applyModeMap(ModeMap &modeMap)
Definition State:2229
FogCoordPointerProc _glFogCoordPointer
Definition State:1389
std::vector< GLushort > IndicesGLushort
Definition State:640
ActiveTextureProc _glClientActiveTexture
Definition State:1384
void unbindPixelBufferObject()
Definition State:600
void loadModelViewMatrix()
void disableVertexAttribPointersAboveAndIncluding(unsigned int index)
Definition State:782
IndicesGLuint _quadIndicesGLuint[4]
Definition State:644
void updateModelViewAndProjectionMatrixUniforms()
void setAttributeBindingList(const Program::AttribBindingList &attribBindingList)
Set the vertex attribute binding list.
Definition State:288
GLenum getReadBuffer() const
Definition State:311
void pushUniformList(UniformMap &uniformMap, const StateSet::UniformList &uniformList)
Definition State:1472
Timer_t getStartTick() const
Support for synchronizing the system time and the timestamp counter available with ARB_timer_query.
Definition State:954
void(GL_APIENTRY * SecondaryColorPointerProc)(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)
Definition State:1367
void setGraphicsContext(GraphicsContext *context)
Set the graphics context associated with that owns this State object.
Definition State:87
ref_ptr< Uniform > _projectionMatrixUniform
Definition State:1110
const Program::PerContextProgram * _lastAppliedProgramObject
Definition State:1295
VertexAttribAlias _vertexAlias
Definition State:1123
void bindVertexBufferObject(osg::GLBufferObject *vbo)
Definition State:570
const StateAttribute * getLastAppliedAttribute(const AttributeMap &attributeMap, StateAttribute::Type type, unsigned int member) const
GLuint64 getGpuTimestamp() const
Definition State:962
void haveAppliedAttribute(const StateAttribute *attribute)
Attribute has been applied externally, update state to reflect this setting.
void(GL_APIENTRY * VertexAttrib4fProc)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
Definition State:1369
bool getUseModelViewAndProjectionUniforms() const
Definition State:240
void MultiTexCoord(unsigned int unit, float x, float y=0.0f, float z=0.0f, float w=1.0f)
Definition State:703
ref_ptr< FrameStamp > _frameStamp
Definition State:1097
std::vector< GLuint > IndicesGLuint
Definition State:643
void setColorPointer(const Array *array)
Definition State:736
bool applyAttribute(const StateAttribute *attribute, AttributeStack &as)
apply an attribute if required, passing in attribute and appropriate attribute stack
Definition State:1183
const DisplaySettings * getDisplaySettings() const
Get the const DisplaySettings.
Definition State:842
VertexAttribAliasList _texCoordAliasList
Definition State:1128
void applyModeMapOnTexUnit(unsigned int unit, ModeMap &modeMap)
Definition State:2255
void pushAttributeList(AttributeMap &attributeMap, const StateSet::AttributeList &attributeList)
Definition State:1442
bool isVertexBufferObjectSupported() const
Definition State:789
void disableAllVertexArrays()
disable the vertex, normal, color, tex coords, secondary color, fog coord and index arrays.
GLenum _readBuffer
Definition State:1100
void setShaderCompositionEnabled(bool flag)
Definition State:156
GLint getUniformLocation(unsigned int uniformNameID) const
Definition State:805
void setFrameStamp(FrameStamp *fs)
Set the frame stamp for the current frame.
Definition State:827
std::map< StateAttribute::TypeMemberPair, AttributeStack > AttributeMap
Definition State:1061
unsigned int getMaxTexturePoolSize() const
Definition State:898
const Program::AttribBindingList & getAttributeBindingList()
Definition State:289
void haveAppliedMode(ModeMap &modeMap, StateAttribute::GLMode mode)
void captureCurrentState(StateSet &stateset) const
Copy the modes and attributes which capture the current state.
void setVertexAttribPointer(unsigned int unit, const Array *array)
Definition State:777
DisableVertexAttribProc _glDisableVertexAttribArray
Definition State:1395
ref_ptr< const RefMatrix > _initialViewMatrix
Definition State:1103
void dirtyAllAttributes()
Dirty the modes attributes previously applied in osg::State.
const DisplaySettings * getActiveDisplaySettings() const
Get the const DisplaySettings that is current active DisplaySettings to be used by osg::State,...
Definition State:848
GraphicsContext * _graphicsContext
Definition State:1085
VertexArrayState * getCurrentVertexArrayState() const
Get the CurrentVetexArrayState object that take which vertex arrays are bound.
Definition State:547
GLint getUniformLocation(const std::string &uniformName) const
Alternative version of getUniformLocation( unsigned int uniformNameID ) retrofited into OSG for backw...
Definition State:814
Timer_t _startTick
Definition State:1409
void setTexCoordAliasList(const VertexAttribAliasList &aliasList)
Set the vertex attribute aliasing list for texture coordinates.
Definition State:284
unsigned int _contextID
Definition State:1086
SecondaryColorPointerProc _glSecondaryColorPointer
Definition State:1390
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 appl...
GLint _glMaxTextureCoords
Definition State:1382
void disableSecondaryColorPointer()
Definition State:742
bool useVertexArrayObject(bool useVAO) const
Definition State:793
std::vector< const StateSet * > StateSetStack
Definition State:204
bool _isFogCoordSupported
Definition State:1359
std::map< StateAttribute::GLMode, ModeStack > ModeMap
Definition State:1058
ref_ptr< Uniform > _modelViewMatrixUniform
Definition State:1109
std::map< const std::type_info *, osg::ref_ptr< osg::Referenced > > ExtensionMap
Definition State:118
void setInitialViewMatrix(const osg::RefMatrix *matrix)
void print(std::ostream &fout) const
print out the internal details of osg::State - useful for debugging.
unsigned int getStateSetStackSize()
Get the number of StateSet's on the StateSet stack.
Definition State:199
ref_ptr< DisplaySettings > _displaySettings
Definition State:1116
ModeMap _modeMap
Definition State:1287
void unbindVertexArrayObject()
Definition State:637
UniformMap _uniformMap
Definition State:1289
void apply(const StateSet *dstate)
Apply stateset.
unsigned int getClientActiveTextureUnit() const
Get the current tex coord array texture unit.
const UniformMap & getUniformMap() const
Definition State:1071
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...
void(GL_APIENTRY * BindBufferProc)(GLenum target, GLuint buffer)
Definition State:1376
const ShaderComposer * getShaderComposer() const
deprecated.
Definition State:168
void set(T *ptr)
Set a specific GL extensions object pr GraphicsObjectManager.
Definition State:149
const GLBufferObject * getCurrentPixelBufferObject() const
Definition State:581
std::map< std::string, UniformStack > UniformMap
Definition State:1064
CheckForGLErrors
Definition State:905
@ ONCE_PER_ATTRIBUTE
ONCE_PER_ATTRIBUTE means that OpenGL errors will be checked for after every attribute is applied,...
Definition State:916
@ NEVER_CHECK_GL_ERRORS
NEVER_CHECK_GL_ERRORS hints that OpenGL need not be checked for, this is the fastest option since che...
Definition State:908
@ ONCE_PER_FRAME
ONCE_PER_FRAME means that OpenGL errors will be checked for once per frame, the overhead is still sma...
Definition State:912
const VertexAttribAliasList & getTexCoordAliasList()
Definition State:285
void pushStateSet(const StateSet *dstate)
Push stateset onto state stack.
void setNormalPointer(const Array *array)
Definition State:732
void setGlobalDefaultModeValue(StateAttribute::GLMode mode, bool enabled)
Definition State:330
void glDrawElementsInstanced(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount)
Definition State:654
const GraphicsCostEstimator * getGraphicsCostEstimator() const
Get the cont helper class that provides applications with estimate on how much different graphics ope...
Definition State:946
bool _forceVertexBufferObject
Definition State:1362
VertexAttrib4fProc _glVertexAttrib4f
Definition State:1387
void setStartTick(Timer_t tick)
Definition State:955
void applyModeListOnTexUnit(unsigned int unit, ModeMap &modeMap, const StateSet::ModeList &modeList)
Definition State:1729
DrawArraysInstancedProc _glDrawArraysInstanced
Definition State:1397
osg::ref_ptr< GraphicsCostEstimator > _graphicsCostEstimator
Definition State:1407
CheckForGLErrors _checkGLErrors
Definition State:1119
void apply()
Updates the OpenGL state so that it matches the StateSet at the top of the stack of StateSets maintai...
TextureModeMapList _textureModeMapList
Definition State:1292
const FrameStamp * getFrameStamp() const
Get the const frame stamp for the current frame.
Definition State:833
void setModeValidity(StateAttribute::GLMode mode, bool valid)
Set whether a particular OpenGL mode is valid in the current graphics context.
Definition State:316
void(GL_APIENTRY * ActiveTextureProc)(GLenum texture)
Definition State:1365
osg::Uniform * getProjectionMatrixUniform()
Definition State:247
GLuint64 _gpuTimestamp
Definition State:1411
unsigned int _dynamicObjectCount
Definition State:1402
void setCurrentElementBufferObject(osg::GLBufferObject *ebo)
Definition State:573
osg::ref_ptr< VertexArrayState > _globalVertexArrayState
Definition State:1088
std::vector< AttributeMap > TextureAttributeMapList
Definition State:1062
const DefineMap & getDefineMap() const
Definition State:1073
GLenum _drawBuffer
Definition State:1099
void disableColorPointer()
Definition State:738
VertexArrayState * _vas
Definition State:1089
void setSecondaryColorAlias(const VertexAttribAlias &alias)
Set the vertex attribute aliasing for "secondary color".
Definition State:276
bool _isSecondaryColorSupported
Definition State:1358
GLuint _currentVAO
Definition State:1307
AttributeDispatchers _arrayDispatchers
Definition State:1405
void setFogCoordPointer(const Array *array)
Definition State:745
bool applyGlobalDefaultAttribute(AttributeStack &as)
Definition State:1237
StateSetStack & getStateSetStack()
Get the StateSet stack.
Definition State:207
void setDisplaySettings(DisplaySettings *vs)
Set the DisplaySettings.
Definition State:839
bool getShaderCompositionEnabled() const
Definition State:159
bool getLastAppliedModeValue(StateAttribute::GLMode mode)
Definition State:341
bool getLastAppliedTextureMode(unsigned int unit, StateAttribute::GLMode mode) const
Get whether the current specified texture mode is enabled (true) or disabled (false).
void Color(float r, float g, float b, float a=1.0f)
Definition State:671
bool applyModeOnTexUnit(unsigned int unit, StateAttribute::GLMode mode, bool enabled, ModeStack &ms)
Definition State:1160
bool _extensionProcsInitialized
Definition State:1381
bool _forceVertexArrayObject
Definition State:1363
unsigned int _maxBufferObjectPoolSize
Definition State:1300
void setMaxBufferObjectPoolSize(unsigned int size)
void applyAttributeList(AttributeMap &attributeMap, const StateSet::AttributeList &attributeList)
Definition State:1851
void disableTexCoordPointersAboveAndIncluding(unsigned int unit)
Definition State:752
GraphicsCostEstimator * getGraphicsCostEstimator()
Get the helper class that provides applications with estimate on how much different graphics operatio...
Definition State:943
ref_ptr< Uniform > _normalMatrixUniform
Definition State:1112
void bindDrawIndirectBufferObject(osg::GLBufferObject *ibo)
Definition State:609
const VertexAttribAlias & getVertexAlias()
Definition State:265
const VertexAttribAlias & getSecondaryColorAlias()
Definition State:277
GLuint getCurrentVertexArrayObject() const
Definition State:631
const T * get() const
Get a specific GL extensions object or GraphicsObjectManager if it already exists in the extension ma...
Definition State:139
void dirtyAllModes()
Dirty the modes previously applied in osg::State.
void haveAppliedMode(StateAttribute::GLMode mode, StateAttribute::GLModeValue value)
Mode has been set externally, update state to reflect this setting.
bool applyTextureAttribute(unsigned int unit, const StateAttribute *attribute)
Definition State:466
unsigned int _currentClientActiveTextureUnit
Definition State:1304
osg::Program * _currentShaderCompositionProgram
Definition State:1094
VertexAttribIPointerProc _glVertexAttribIPointer
Definition State:1392
void disableTexCoordPointer(unsigned int unit)
Definition State:751
void drawQuads(GLint first, GLsizei count, GLsizei primCount=0)
const Viewport * getCurrentViewport() const
Definition State:219
bool isFogCoordSupported() const
Definition State:744
void Vertex(float x, float y, float z, float w=1.0f)
Definition State:661
bool applyMode(StateAttribute::GLMode mode, bool enabled)
Apply an OpenGL mode if required.
Definition State:395
bool isSecondaryColorSupported() const
Definition State:740
void setSecondaryColorPointer(const Array *array)
Definition State:741
const ModeMap & getModeMap() const
Definition State:1069
ExtensionMap _extensionMap
Definition State:119
unsigned int getDynamicObjectCount() const
Get the number of dynamic objects that will be rendered in this graphics context this frame.
Definition State:884
std::vector< AttributePair > AttributeVec
Definition State:818
VertexAttribAlias _normalAlias
Definition State:1124
void setFogCoordAlias(const VertexAttribAlias &alias)
Set the vertex attribute aliasing for "fog coord".
Definition State:280
void setUseModelViewAndProjectionUniforms(bool flag)
Definition State:239
bool applyAttribute(const StateAttribute *attribute)
Apply an attribute if required.
Definition State:444
const VertexAttribAlias & getFogCoordAlias()
Definition State:281
void disableVertexPointer()
Definition State:729
void applyProjectionMatrix(const osg::RefMatrix *matrix)
osg::ref_ptr< DynamicObjectRenderingCompletedCallback > _completeDynamicObjectRenderingCallback
Definition State:1403
DynamicObjectRenderingCompletedCallback * getDynamicObjectRenderingCompletedCallback()
Get the callback to be called when the dynamic object count hits 0.
Definition State:868
void disableNormalPointer()
Definition State:734
void applyDefineList(DefineMap &uniformMap, const StateSet::DefineList &defineList)
Definition State:2161
bool setActiveTextureUnit(unsigned int unit)
Set the current texture unit, return true if selected, false if selection failed such as when multi t...
Definition State:2345
void(GL_APIENTRY * FogCoordPointerProc)(GLenum type, GLsizei stride, const GLvoid *pointer)
Definition State:1366
void pushModeList(ModeMap &modeMap, const StateSet::ModeList &modeList)
Definition State:1415
const StateAttribute * getGlobalDefaultAttribute(StateAttribute::Type type, unsigned int member=0)
Definition State:437
void setShaderComposer(ShaderComposer *sc)
deprecated.
Definition State:162
osg::Uniform * getModelViewProjectionMatrixUniform()
Definition State:248
void setGpuTimestamp(Timer_t tick, GLuint64 timestamp)
Definition State:964
void setCurrentVertexBufferObject(osg::GLBufferObject *vbo)
Definition State:567
bool isVertexArrayObjectSupported() const
Definition State:792
bool applyTextureMode(unsigned int unit, StateAttribute::GLMode mode, bool enabled)
Definition State:416
const osg::Matrix & getInitialViewMatrix() const
Definition State:227
unsigned int _currentActiveTextureUnit
Definition State:1303
VertexAttribLPointerProc _glVertexAttribLPointer
Definition State:1393
void setDynamicObjectRenderingCompletedCallback(DynamicObjectRenderingCompletedCallback *cb)
Set the callback to be called when the dynamic object count hits 0.
Definition State:865
const VertexAttribAlias & getColorAlias()
Definition State:273
double getGpuTime() const
Definition State:958
const AttributeMap & getAttributeMap() const
Definition State:1070
void initializeExtensionProcs()
Initialize extension used by osg::State.
MultiTexCoord4fProc _glMultiTexCoord4f
Definition State:1386
StateSet::UniformList _currentShaderCompositionUniformList
Definition State:1095
void bindVertexArrayObject(const VertexArrayState *vas)
Definition State:633
GLint getMaxTextureCoords() const
For GL>=2.0 uses GL_MAX_TEXTURE_COORDS, for GL<2 uses GL_MAX_TEXTURE_UNITS.
Definition State:755
void setDynamicObjectCount(unsigned int count, bool callCallbackOnZero=false)
Set the number of dynamic objects that will be rendered in this graphics context this frame.
Definition State:871
void applyDisablingOfVertexAttributes()
Definition State:565
unsigned int _maxTexturePoolSize
Definition State:1299
void setNormalAlias(const VertexAttribAlias &alias)
Set the vertex attribute aliasing for "normal".
Definition State:268
void setUseVertexAttributeAliasing(bool flag)
void resetVertexAttributeAlias(bool compactAliasing=true, unsigned int numTextureUnits=8)
Reset the vertex attribute aliasing to osg's default.
bool checkGLErrors(const char *str1=0, const char *str2=0) const
void glDrawBuffer(GLenum buffer)
void bindElementBufferObject(osg::GLBufferObject *ebo)
Definition State:576
bool convertVertexShaderSourceToOsgBuiltIns(std::string &source) const
void setInterleavedArrays(GLenum format, GLsizei stride, const GLvoid *pointer)
Wrapper around glInterleavedArrays(..).
Definition State:724
~ApplyModeProxy()
Definition State:355
ApplyModeProxy(osg::State &state, GLenum mode, bool value)
Definition State:349
bool _need_to_apply_value
Definition State:363
osg::State & _state
Definition State:360
GLenum _mode
Definition State:361
bool _previous_value
Definition State:362
bool _previous_value
Definition State:382
osg::State & _state
Definition State:379
GLenum _mode
Definition State:381
bool _need_to_apply_value
Definition State:383
ApplyTextureModeProxy(osg::State &state, unsigned int unit, GLenum mode, bool value)
Definition State:368
~ApplyTextureModeProxy()
Definition State:374
unsigned int _unit
Definition State:380
~SetCurrentVertexArrayStateProxy()
Definition State:539
SetCurrentVertexArrayStateProxy(osg::State &state, VertexArrayState *vas)
Definition State:538
osg::State & _state
Definition State:540
virtual void completed(osg::State *)=0
bool valid
Definition State:990
std::vector< StateAttribute::GLModeValue > ValueVec
Definition State:978
bool changed
Definition State:991
ValueVec valueVec
Definition State:994
bool global_default_value
Definition State:993
bool last_applied_value
Definition State:992
void print(std::ostream &fout) const
ModeStack()
Definition State:980
const ShaderComponent * last_applied_shadercomponent
Definition State:1013
AttributeStack()
Definition State:999
bool changed
apply an attribute if required, passing in attribute and appropriate attribute stack
Definition State:1011
AttributeVec attributeVec
Definition State:1015
const StateAttribute * last_applied_attribute
Definition State:1012
void print(std::ostream &fout) const
ref_ptr< const StateAttribute > global_default_attribute
Definition State:1014
UniformVec uniformVec
Definition State:1028
UniformStack()
Definition State:1024
std::vector< UniformPair > UniformVec
Definition State:1022
std::pair< const Uniform *, StateAttribute::OverrideValue > UniformPair
Definition State:1021
void print(std::ostream &fout) const
DefineStack()
Definition State:1035
void print(std::ostream &fout) const
std::vector< StateSet::DefinePair > DefineVec
Definition State:1033
DefineVec defineVec
Definition State:1041
bool changed
Definition State:1040
bool changed
Definition State:1051
bool updateCurrentDefines()
std::map< std::string, DefineStack > DefineStackMap
Definition State:1049
DefineStackMap map
Definition State:1050
StateSet::DefineList currentDefines
Definition State:1052
DefineMap()
Definition State:1046
Base class for state attributes.
Definition StateAttribute:77
GLenum GLMode
GLMode is the value used in glEnable/glDisable(mode)
Definition StateAttribute:81
@ OVERRIDE
Overriding of GLMode's or StateAttributes is enabled, so that state below it is overridden.
Definition StateAttribute:105
@ PROTECTED
Protecting of GLMode's or StateAttributes is enabled, so that state from above cannot override this a...
Definition StateAttribute:107
@ ON
means that associated GLMode is enabled and Override is disabled.
Definition StateAttribute:103
ShaderComponent * getShaderComponent()
Definition StateAttribute:304
TypeMemberPair getTypeMemberPair() const
Return the TypeMemberPair that uniquely identifies this type member.
Definition StateAttribute:270
unsigned int GLModeValue
GLModeValue is used to specify whether a mode is enabled (ON) or disabled (OFF).
Definition StateAttribute:85
virtual void apply(State &) const
apply the OpenGL state attributes.
Definition StateAttribute:358
Type
Type identifier to differentiate between different state types.
Definition StateAttribute:124
@ VIEWPORT
Definition StateAttribute:155
std::pair< Type, unsigned int > TypeMemberPair
Simple pairing between an attribute type and the member within that attribute type group.
Definition StateAttribute:218
virtual Object * cloneType() const =0
Clone the type of an attribute, with Object* return type.
unsigned int OverrideValue
Override is used to specify the override behavior of StateAttributes from parent to children.
Definition StateAttribute:89
Stores a set of modes and attributes which represent a set of OpenGL state.
Definition StateSet:46
std::pair< ref_ptr< Uniform >, StateAttribute::OverrideValue > RefUniformPair
Simple pairing between a Uniform and its override flag.
Definition StateSet:302
std::map< std::string, RefUniformPair > UniformList
a container to map Uniform name to its respective RefUniformPair.
Definition StateSet:305
std::map< StateAttribute::TypeMemberPair, RefAttributePair > AttributeList
a container to map <StateAttribyte::Types,Member> to their respective RefAttributePair.
Definition StateSet:166
std::pair< std::string, StateAttribute::OverrideValue > DefinePair
Definition StateSet:345
std::map< StateAttribute::GLMode, StateAttribute::GLModeValue > ModeList
a container to map GLModes to their respective GLModeValues.
Definition StateSet:119
std::map< std::string, DefinePair > DefineList
Definition StateSet:346
static Timer * instance()
double delta_s(Timer_t t1, Timer_t t2) const
Get the time in seconds between timer ticks t1 and t2.
Definition Timer:59
Uniform encapsulates glUniform values.
Definition Uniform:414
Definition VertexArrayState:25
GLuint getVertexArrayObject() const
Definition VertexArrayState:173
Encapsulate OpenGL glViewport.
Definition Viewport:24
#define OSG_EXPORT
Definition Export:39