From c8b8a81052c8e0a4ca6cf13b71ff74955e9e3184 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 3 Mar 2004 15:38:22 +0000 Subject: [PATCH] Changed StateAttribute::getAssociatedModes(std::vector&) across to StateAttribute::getModeUsage(StateAttribute::ModeUsage&). --- include/osg/AlphaFunc | 5 +-- include/osg/BlendColor | 6 ++-- include/osg/BlendFunc | 5 +-- include/osg/ClipPlane | 5 +-- include/osg/CullFace | 5 +-- include/osg/Depth | 5 +-- include/osg/Fog | 5 +-- include/osg/FragmentProgram | 5 +-- include/osg/Light | 5 +-- include/osg/LineStipple | 5 +-- include/osg/Material | 8 ++--- include/osg/Multisample | 3 -- include/osg/Point | 5 +-- include/osg/PointSprite | 6 +++- include/osg/PolygonOffset | 9 ++--- include/osg/PolygonStipple | 5 +-- include/osg/StateAttribute | 12 +++++-- include/osg/StateSet | 1 - include/osg/Stencil | 5 +-- include/osg/TexGen | 11 +++--- include/osg/Texture1D | 5 +-- include/osg/Texture2D | 5 +-- include/osg/Texture3D | 5 +-- include/osg/TextureCubeMap | 5 +-- include/osg/TextureRectangle | 5 +-- include/osg/VertexProgram | 5 +-- src/osg/BlendColor.cpp | 1 + src/osg/Multisample.cpp | 1 + src/osg/PointSprite.cpp | 5 --- src/osg/StateSet.cpp | 65 +++++++++++++++++++++--------------- 30 files changed, 126 insertions(+), 92 deletions(-) diff --git a/include/osg/AlphaFunc b/include/osg/AlphaFunc index 5a99b6143..09922da27 100644 --- a/include/osg/AlphaFunc +++ b/include/osg/AlphaFunc @@ -49,9 +49,10 @@ class SG_EXPORT AlphaFunc : public StateAttribute return 0; // passed all the above comparison macro's, must be equal. } - virtual void getAssociatedModes(std::vector& modes) const + virtual bool getModeUsage(ModeUsage& usage) const { - modes.push_back(GL_ALPHA_TEST); + usage.usesMode(GL_ALPHA_TEST); + return true; } enum ComparisonFunction { diff --git a/include/osg/BlendColor b/include/osg/BlendColor index 98a020c32..2c6efff64 100644 --- a/include/osg/BlendColor +++ b/include/osg/BlendColor @@ -17,7 +17,6 @@ #include #include #include -#include #include @@ -51,9 +50,10 @@ class SG_EXPORT BlendColor : public StateAttribute return 0; // passed all the above comparison macro's, must be equal. } - virtual void getAssociatedModes(std::vector& modes) const + virtual bool getModeUsage(ModeUsage& usage) const { - modes.push_back(GL_BLEND); + usage.usesMode(GL_BLEND); + return true; } void setConstantColor(const osg::Vec4& color) { _constantColor = color; } diff --git a/include/osg/BlendFunc b/include/osg/BlendFunc index 5dce7dc1a..b18dc5efb 100644 --- a/include/osg/BlendFunc +++ b/include/osg/BlendFunc @@ -60,9 +60,10 @@ class SG_EXPORT BlendFunc : public StateAttribute return 0; // passed all the above comparison macro's, must be equal. } - virtual void getAssociatedModes(std::vector& modes) const + virtual bool getModeUsage(ModeUsage& usage) const { - modes.push_back(GL_BLEND); + usage.usesMode(GL_BLEND); + return true; } enum BlendFuncMode { diff --git a/include/osg/ClipPlane b/include/osg/ClipPlane index 3aa7a69f1..173cb2ebb 100644 --- a/include/osg/ClipPlane +++ b/include/osg/ClipPlane @@ -59,9 +59,10 @@ class SG_EXPORT ClipPlane : public StateAttribute return 0; // passed all the above comparison macro's, must be equal. } - virtual void getAssociatedModes(std::vector& modes) const + virtual bool getModeUsage(ModeUsage& usage) const { - modes.push_back((GLMode)(GL_CLIP_PLANE0+_clipPlaneNum)); + usage.usesMode((GLMode)(GL_CLIP_PLANE0+_clipPlaneNum)); + return true; } diff --git a/include/osg/CullFace b/include/osg/CullFace index 03fdc6c26..a20831f92 100644 --- a/include/osg/CullFace +++ b/include/osg/CullFace @@ -54,9 +54,10 @@ class SG_EXPORT CullFace : public StateAttribute return 0; // passed all the above comparison macro's, must be equal. } - virtual void getAssociatedModes(std::vector& modes) const + virtual bool getModeUsage(ModeUsage& usage) const { - modes.push_back(GL_CULL_FACE); + usage.usesMode(GL_CULL_FACE); + return true; } inline void setMode(Mode mode) { _mode = mode; } diff --git a/include/osg/Depth b/include/osg/Depth index 9b603be90..0077db3ec 100644 --- a/include/osg/Depth +++ b/include/osg/Depth @@ -67,9 +67,10 @@ class SG_EXPORT Depth : public StateAttribute return 0; // passed all the above comparison macro's, must be equal. } - virtual void getAssociatedModes(std::vector& modes) const + virtual bool getModeUsage(ModeUsage& usage) const { - modes.push_back(GL_DEPTH_TEST); + usage.usesMode(GL_DEPTH_TEST); + return true; } inline void setFunction(Function func) { _func = func; } diff --git a/include/osg/Fog b/include/osg/Fog index 44c1ab230..a718fe211 100644 --- a/include/osg/Fog +++ b/include/osg/Fog @@ -64,9 +64,10 @@ class SG_EXPORT Fog : public StateAttribute return 0; // passed all the above comparison macro's, must be equal. } - virtual void getAssociatedModes(std::vector& modes) const + virtual bool getModeUsage(ModeUsage& usage) const { - modes.push_back(GL_FOG); + usage.usesMode(GL_FOG); + return true; } enum Mode { diff --git a/include/osg/FragmentProgram b/include/osg/FragmentProgram index ca8332051..fc68bc37f 100644 --- a/include/osg/FragmentProgram +++ b/include/osg/FragmentProgram @@ -136,9 +136,10 @@ class SG_EXPORT FragmentProgram : public StateAttribute return 0; // passed all the above comparison macro's, must be equal. } - virtual void getAssociatedModes(std::vector& modes) const + virtual bool getModeUsage(ModeUsage& usage) const { - modes.push_back(GL_FRAGMENT_PROGRAM_ARB); + usage.usesMode(GL_FRAGMENT_PROGRAM_ARB); + return true; } // data access methods. diff --git a/include/osg/Light b/include/osg/Light index 1003389f3..ccf94b1d0 100644 --- a/include/osg/Light +++ b/include/osg/Light @@ -67,9 +67,10 @@ class SG_EXPORT Light : public StateAttribute return 0; // passed all the above comparison macro's, must be equal. } - virtual void getAssociatedModes(std::vector& modes) const + virtual bool getModeUsage(ModeUsage& usage) const { - modes.push_back(GL_LIGHT0+_lightnum); + usage.usesMode(GL_LIGHT0+_lightnum); + return true; } /** Set which OpenGL light to operate on.*/ diff --git a/include/osg/LineStipple b/include/osg/LineStipple index 31146b693..4761e33ac 100644 --- a/include/osg/LineStipple +++ b/include/osg/LineStipple @@ -46,9 +46,10 @@ class SG_EXPORT LineStipple : public StateAttribute return 0; // passed all the above comparison macro's, must be equal. } - virtual void getAssociatedModes(std::vector& modes) const + virtual bool getModeUsage(ModeUsage& usage) const { - modes.push_back(GL_LINE_STIPPLE); + usage.usesMode(GL_LINE_STIPPLE); + return true; } void setFactor(GLint factor); diff --git a/include/osg/Material b/include/osg/Material index e3d02b77c..4e72b0954 100644 --- a/include/osg/Material +++ b/include/osg/Material @@ -79,12 +79,10 @@ class SG_EXPORT Material : public StateAttribute Material& operator = (const Material& rhs); - virtual void getAssociatedModes(std::vector& modes) const + virtual bool getModeUsage(ModeUsage& usage) const { - // Have to think about the role of _colorMode - // in setting the colormaterial... also need to take the - // color material enable/disable out of the the apply()... - modes.push_back(GL_COLOR_MATERIAL); + usage.usesMode(GL_COLOR_MATERIAL); + return true; } virtual void apply(State& state) const; diff --git a/include/osg/Multisample b/include/osg/Multisample index d6d2f8bbf..c968841af 100644 --- a/include/osg/Multisample +++ b/include/osg/Multisample @@ -18,7 +18,6 @@ #include #include #include -#include #ifndef GL_ARB_multisample @@ -77,8 +76,6 @@ class SG_EXPORT Multisample : public StateAttribute return 0; // passed all the above comparison macro's, must be equal. } - virtual void getAssociatedModes(std::vector& /*modes*/) const {} - void setSampleCoverage(float coverage, bool invert) { _coverage = coverage; diff --git a/include/osg/Point b/include/osg/Point index e710c23f7..2337f6a50 100644 --- a/include/osg/Point +++ b/include/osg/Point @@ -54,9 +54,10 @@ class SG_EXPORT Point : public StateAttribute return 0; // passed all the above comparison macro's, must be equal. } - virtual void getAssociatedModes(std::vector& modes) const + virtual bool getModeUsage(ModeUsage& usage) const { - modes.push_back(GL_POINT_SMOOTH); + usage.usesMode(GL_POINT_SMOOTH); + return true; } void setSize(float size); diff --git a/include/osg/PointSprite b/include/osg/PointSprite index 996b5c8e3..b13e72a86 100644 --- a/include/osg/PointSprite +++ b/include/osg/PointSprite @@ -40,7 +40,11 @@ public: /** return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.*/ virtual int compare(const StateAttribute& sa) const; - virtual void getAssociatedModes(std::vector& modes) const; + virtual bool getModeUsage(ModeUsage& usage) const + { + usage.usesMode(GL_POINT_SPRITE_ARB); + return true; + } virtual bool isTextureAttribute() const { return true; } diff --git a/include/osg/PolygonOffset b/include/osg/PolygonOffset index 84987f8b5..d633a5f1f 100644 --- a/include/osg/PolygonOffset +++ b/include/osg/PolygonOffset @@ -49,11 +49,12 @@ class SG_EXPORT PolygonOffset : public StateAttribute return 0; // passed all the above comparison macro's, must be equal. } - virtual void getAssociatedModes(std::vector& modes) const + virtual bool getModeUsage(ModeUsage& usage) const { - modes.push_back(GL_POLYGON_OFFSET_FILL); - modes.push_back(GL_POLYGON_OFFSET_LINE); - modes.push_back(GL_POLYGON_OFFSET_POINT); + usage.usesMode(GL_POLYGON_OFFSET_FILL); + usage.usesMode(GL_POLYGON_OFFSET_LINE); + usage.usesMode(GL_POLYGON_OFFSET_POINT); + return true; } inline void setFactor(float factor) { _factor = factor; } diff --git a/include/osg/PolygonStipple b/include/osg/PolygonStipple index 229cf0b25..0a0710518 100644 --- a/include/osg/PolygonStipple +++ b/include/osg/PolygonStipple @@ -34,9 +34,10 @@ class SG_EXPORT PolygonStipple : public StateAttribute /** return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.*/ virtual int compare(const StateAttribute& sa) const; - virtual void getAssociatedModes(std::vector& modes) const + virtual bool getModeUsage(ModeUsage& usage) const { - modes.push_back(GL_POLYGON_STIPPLE); + usage.usesMode(GL_POLYGON_STIPPLE); + return true; } /** set the mask up, copying 128 bytes (32x32 bitfield) from mask into the local _mask.*/ diff --git a/include/osg/StateAttribute b/include/osg/StateAttribute index 123553ba7..1985e4122 100644 --- a/include/osg/StateAttribute +++ b/include/osg/StateAttribute @@ -19,7 +19,6 @@ #include #include -#include namespace osg { @@ -209,10 +208,17 @@ class SG_EXPORT StateAttribute : public Object bool operator != (const StateAttribute& rhs) const { return compare(rhs)!=0; } - /** return the modes associated with this StateSet*/ - virtual void getAssociatedModes(std::vector& /*modes*/) const + struct ModeUsage + { + virtual void usesMode(GLMode mode) = 0; + virtual void usesTextureMode(GLMode mode) = 0; + }; + + /** return the modes associated with this StateAttribute.*/ + virtual bool getModeUsage(ModeUsage&) const { // default to no GLMode's associated with use of the StateAttribute. + return false; } /** apply the OpenGL state attributes. diff --git a/include/osg/StateSet b/include/osg/StateSet index d93c7a4d9..6d273e287 100644 --- a/include/osg/StateSet +++ b/include/osg/StateSet @@ -250,7 +250,6 @@ class SG_EXPORT StateSet : public Object void setMode(ModeList& modeList,StateAttribute::GLMode mode, StateAttribute::GLModeValue value); void setModeToInherit(ModeList& modeList,StateAttribute::GLMode mode); StateAttribute::GLModeValue getMode(const ModeList& modeList,StateAttribute::GLMode mode) const; - void setAssociatedModes(ModeList& modeList,const StateAttribute* attribute, StateAttribute::GLModeValue value); void setAttribute(AttributeList& attributeList,StateAttribute *attribute, const StateAttribute::OverrideValue value=StateAttribute::OFF); diff --git a/include/osg/Stencil b/include/osg/Stencil index 066a41b15..352c8fb1a 100644 --- a/include/osg/Stencil +++ b/include/osg/Stencil @@ -60,9 +60,10 @@ class SG_EXPORT Stencil : public StateAttribute return 0; // passed all the above comparison macro's, must be equal. } - virtual void getAssociatedModes(std::vector& modes) const + virtual bool getModeUsage(ModeUsage& usage) const { - modes.push_back(GL_STENCIL_TEST); + usage.usesMode(GL_STENCIL_TEST); + return true; } enum Function diff --git a/include/osg/TexGen b/include/osg/TexGen index 195583a91..c04e4f7c7 100644 --- a/include/osg/TexGen +++ b/include/osg/TexGen @@ -64,10 +64,10 @@ class SG_EXPORT TexGen : public StateAttribute return 0; // passed all the above comparison macro's, must be equal. } - virtual void getAssociatedModes(std::vector& modes) const + virtual bool getModeUsage(ModeUsage& usage) const { - modes.push_back(GL_TEXTURE_GEN_S); - modes.push_back(GL_TEXTURE_GEN_T); + usage.usesTextureMode(GL_TEXTURE_GEN_S); + usage.usesTextureMode(GL_TEXTURE_GEN_T); // Not happy with turning all tex gen paramters on // as the OSG currently only supports 2D textures and therefore @@ -79,8 +79,9 @@ class SG_EXPORT TexGen : public StateAttribute // The tidy up is now happening, but will have a think before // resolving the below parameters. - modes.push_back(GL_TEXTURE_GEN_R); - modes.push_back(GL_TEXTURE_GEN_Q); + usage.usesTextureMode(GL_TEXTURE_GEN_R); + usage.usesTextureMode(GL_TEXTURE_GEN_Q); + return true; } virtual void apply(State& state) const; diff --git a/include/osg/Texture1D b/include/osg/Texture1D index 8dfdeed9c..761260c9b 100644 --- a/include/osg/Texture1D +++ b/include/osg/Texture1D @@ -36,9 +36,10 @@ class SG_EXPORT Texture1D : public Texture /** return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.*/ virtual int compare(const StateAttribute& rhs) const; - virtual void getAssociatedModes(std::vector& modes) const + virtual bool getModeUsage(ModeUsage& usage) const { - modes.push_back(GL_TEXTURE_1D); + usage.usesTextureMode(GL_TEXTURE_1D); + return true; } /** Set the texture image. */ diff --git a/include/osg/Texture2D b/include/osg/Texture2D index 7d8213f97..042088d63 100644 --- a/include/osg/Texture2D +++ b/include/osg/Texture2D @@ -36,9 +36,10 @@ class SG_EXPORT Texture2D : public Texture /** return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.*/ virtual int compare(const StateAttribute& rhs) const; - virtual void getAssociatedModes(std::vector& modes) const + virtual bool getModeUsage(ModeUsage& usage) const { - modes.push_back(GL_TEXTURE_2D); + usage.usesTextureMode(GL_TEXTURE_2D); + return true; } /** Set the texture image. */ diff --git a/include/osg/Texture3D b/include/osg/Texture3D index af63fba63..6fd21833c 100644 --- a/include/osg/Texture3D +++ b/include/osg/Texture3D @@ -34,9 +34,10 @@ class SG_EXPORT Texture3D : public Texture /** return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.*/ virtual int compare(const StateAttribute& rhs) const; - virtual void getAssociatedModes(std::vector& modes) const + virtual bool getModeUsage(ModeUsage& usage) const { - modes.push_back(GL_TEXTURE_3D); + usage.usesTextureMode(GL_TEXTURE_3D); + return true; } /** Set the texture image. */ diff --git a/include/osg/TextureCubeMap b/include/osg/TextureCubeMap index 60af5a80d..e62689882 100644 --- a/include/osg/TextureCubeMap +++ b/include/osg/TextureCubeMap @@ -38,9 +38,10 @@ class SG_EXPORT TextureCubeMap : public Texture /** return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.*/ virtual int compare(const StateAttribute& rhs) const; - virtual void getAssociatedModes(std::vector& modes) const + virtual bool getModeUsage(ModeUsage& usage) const { - modes.push_back(GL_TEXTURE_CUBE_MAP); + usage.usesTextureMode(GL_TEXTURE_CUBE_MAP); + return true; } enum Face { diff --git a/include/osg/TextureRectangle b/include/osg/TextureRectangle index 7b5977e97..ce4a8cfad 100644 --- a/include/osg/TextureRectangle +++ b/include/osg/TextureRectangle @@ -38,9 +38,10 @@ class SG_EXPORT TextureRectangle : public Texture /** return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.*/ virtual int compare(const StateAttribute& rhs) const; - virtual void getAssociatedModes(std::vector& modes) const + virtual bool getModeUsage(ModeUsage& usage) const { - modes.push_back(GL_TEXTURE_RECTANGLE_NV); + usage.usesTextureMode(GL_TEXTURE_RECTANGLE_NV); + return true; } /** Set the texture image. */ diff --git a/include/osg/VertexProgram b/include/osg/VertexProgram index 567827470..a163491e9 100644 --- a/include/osg/VertexProgram +++ b/include/osg/VertexProgram @@ -136,9 +136,10 @@ class SG_EXPORT VertexProgram : public StateAttribute return 0; // passed all the above comparison macro's, must be equal. } - virtual void getAssociatedModes(std::vector& modes) const + virtual bool getModeUsage(ModeUsage& usage) const { - modes.push_back(GL_VERTEX_PROGRAM_ARB); + usage.usesMode(GL_VERTEX_PROGRAM_ARB); + return true; } // data access methods. diff --git a/src/osg/BlendColor.cpp b/src/osg/BlendColor.cpp index 5b67ac238..1934870e8 100644 --- a/src/osg/BlendColor.cpp +++ b/src/osg/BlendColor.cpp @@ -14,6 +14,7 @@ #include #include #include +#include using namespace osg; diff --git a/src/osg/Multisample.cpp b/src/osg/Multisample.cpp index f433b5113..643ad821b 100644 --- a/src/osg/Multisample.cpp +++ b/src/osg/Multisample.cpp @@ -14,6 +14,7 @@ #include #include #include +#include using namespace osg; diff --git a/src/osg/PointSprite.cpp b/src/osg/PointSprite.cpp index 4ec2081f8..57945e9b6 100644 --- a/src/osg/PointSprite.cpp +++ b/src/osg/PointSprite.cpp @@ -25,11 +25,6 @@ int PointSprite::compare(const StateAttribute& sa) const return 0; // passed all the above comparison macro's, must be equal. } -void PointSprite::getAssociatedModes(std::vector& modes) const -{ - modes.push_back(GL_POINT_SPRITE_ARB); -} - void PointSprite::apply(osg::State&) const { glTexEnvi(GL_POINT_SPRITE_ARB, GL_COORD_REPLACE_ARB, 1); diff --git a/src/osg/StateSet.cpp b/src/osg/StateSet.cpp index ed644ff62..fd9ee4a51 100644 --- a/src/osg/StateSet.cpp +++ b/src/osg/StateSet.cpp @@ -578,7 +578,7 @@ void StateSet::setAttributeAndModes(StateAttribute *attribute, StateAttribute::G else { setAttribute(_attributeList,attribute,value); - setAssociatedModes(_modeList,attribute,value); + setAssociatedModes(attribute,value); } } else @@ -597,7 +597,7 @@ void StateSet::setAttributeToInherit(StateAttribute::Type type) AttributeList::iterator itr = _attributeList.find(type); if (itr!=_attributeList.end()) { - setAssociatedModes(_modeList,itr->second.first.get(),StateAttribute::INHERIT); + setAssociatedModes(itr->second.first.get(),StateAttribute::INHERIT); _attributeList.erase(itr); } } @@ -617,12 +617,6 @@ const StateSet::RefAttributePair* StateSet::getAttributePair(StateAttribute::Typ return getAttributePair(_attributeList,type); } -void StateSet::setAssociatedModes(const StateAttribute* attribute, StateAttribute::GLModeValue value) -{ - setAssociatedModes(_modeList,attribute,value); -} - - void StateSet::setTextureMode(unsigned int unit,StateAttribute::GLMode mode, StateAttribute::GLModeValue value) { if (s_textureGLModeSet.isTextureMode(mode)) @@ -707,7 +701,7 @@ void StateSet::setTextureAttributeAndModes(unsigned int unit,StateAttribute *att else { setAttribute(getOrCreateTextureAttributeList(unit),attribute,value); - setAssociatedModes(getOrCreateTextureModeList(unit),attribute,value); + setAssociatedTextureModes(unit,attribute,value); } } else @@ -730,7 +724,7 @@ void StateSet::setTextureAttributeToInherit(unsigned int unit,StateAttribute::Ty { if (unit<_textureModeList.size()) { - setAssociatedModes(_textureModeList[unit],itr->second.first.get(),StateAttribute::INHERIT); + setAssociatedTextureModes(unit,itr->second.first.get(),StateAttribute::INHERIT); } attributeList.erase(itr); } @@ -757,11 +751,6 @@ const StateSet::RefAttributePair* StateSet::getTextureAttributePair(unsigned int return getAttributePair(_textureAttributeList[unit],type); } -void StateSet::setAssociatedTextureModes(unsigned int unit,const StateAttribute* attribute, StateAttribute::GLModeValue value) -{ - setAssociatedModes(getOrCreateTextureModeList(unit),attribute,value); -} - void StateSet::compile(State& state) const { @@ -853,19 +842,43 @@ StateAttribute::GLModeValue StateSet::getMode(const ModeList& modeList,StateAttr return StateAttribute::INHERIT; } -void StateSet::setAssociatedModes(ModeList& modeList,const StateAttribute* attribute, StateAttribute::GLModeValue value) +class SetAssociateModesHelper : public StateAttribute::ModeUsage { - // get the associated modes. - std::vector modes; - attribute->getAssociatedModes(modes); + public: + SetAssociateModesHelper(StateSet* stateset, StateAttribute::GLModeValue value,unsigned int unit=0): + _stateset(stateset), + _value(value), + _unit(unit) {} + + virtual ~SetAssociateModesHelper() {} + + virtual void usesMode(StateAttribute::GLMode mode) + { + _stateset->setMode(mode,_value); + } + + virtual void usesTextureMode(StateAttribute::GLMode mode) + { + _stateset->setTextureMode(_unit,mode,_value); + } + + + + StateSet* _stateset; + StateAttribute::GLModeValue _value; + unsigned int _unit; +}; - // set the modes on the StateSet. - for(std::vector::iterator itr=modes.begin(); - itr!=modes.end(); - ++itr) - { - setMode(modeList,*itr,value); - } +void StateSet::setAssociatedModes(const StateAttribute* attribute, StateAttribute::GLModeValue value) +{ + SetAssociateModesHelper helper(this,value); + attribute->getModeUsage(helper); +} + +void StateSet::setAssociatedTextureModes(unsigned int unit,const StateAttribute* attribute, StateAttribute::GLModeValue value) +{ + SetAssociateModesHelper helper(this,value,unit); + attribute->getModeUsage(helper); } void StateSet::setAttribute(AttributeList& attributeList,StateAttribute *attribute, const StateAttribute::OverrideValue value)