From 0bbd715f65b82022d13a1d621322cab60c028a11 Mon Sep 17 00:00:00 2001 From: scrawl Date: Tue, 9 Aug 2016 01:12:54 +0200 Subject: [PATCH] Fix the cloned StateSet not being assigned --- apps/openmw/mwrender/animation.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/openmw/mwrender/animation.cpp b/apps/openmw/mwrender/animation.cpp index 0412e1e41..3f09dffc5 100644 --- a/apps/openmw/mwrender/animation.cpp +++ b/apps/openmw/mwrender/animation.cpp @@ -1138,7 +1138,10 @@ namespace MWRender if (!node->getStateSet()) writableStateSet = node->getOrCreateStateSet(); else + { writableStateSet = osg::clone(node->getStateSet(), osg::CopyOp::SHALLOW_COPY); + node->setStateSet(writableStateSet); + } writableStateSet->setTextureAttributeAndModes(texUnit, textures.front(), osg::StateAttribute::ON); writableStateSet->addUniform(new osg::Uniform("envMapColor", glowColor));