From 673292b995115c6ca9a3cc82c26e05023f504774 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 13 Jun 2018 12:23:29 +0100 Subject: [PATCH] Moved Stae::setUseVertexAttributeAliasing(bool) implementation to .cpp an added call to _globalVertexArrayState->assignAllDispatchers(); to ensure state is consistent --- include/osg/State | 2 +- src/osg/State.cpp | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) 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;