diff --git a/include/osg/State b/include/osg/State index 765eab737..d795ae88a 100644 --- a/include/osg/State +++ b/include/osg/State @@ -252,7 +252,7 @@ class OSG_EXPORT State : public Referenced Polytope getViewFrustum() const; - void setUseVertexAttributeAliasing(bool flag) { _useVertexAttributeAliasing = flag; } + void setUseVertexAttributeAliasing(bool flag); bool getUseVertexAttributeAliasing() const { return _useVertexAttributeAliasing ; } typedef std::vector VertexAttribAliasList; diff --git a/src/osg/State.cpp b/src/osg/State.cpp index c2b72b066..d41cc362d 100644 --- a/src/osg/State.cpp +++ b/src/osg/State.cpp @@ -170,6 +170,12 @@ State::~State() //_vertexAttribArrayList.clear(); } +void State::setUseVertexAttributeAliasing(bool flag) +{ + _useVertexAttributeAliasing = flag; + if (_globalVertexArrayState.valid()) _globalVertexArrayState->assignAllDispatchers(); +} + void State::initializeExtensionProcs() { if (_extensionProcsInitialized) return;