mirror of
https://github.com/OpenMW/openmw.git
synced 2025-03-01 06:09:42 +00:00
Guarantee glow updater regenerates shaders on completion
Previously, it would edit the odd numbered stateset, then regenerate shaders for the even-numbered one, then edit the even numbered one, and regenerate shaders for the odd numbered one (or vice versa if it finished during an even numbered frame). This would leave one of the shader programs still trying to use the state that had been removed.
This commit is contained in:
parent
a98847e670
commit
5ad297e6ff
1 changed files with 2 additions and 0 deletions
|
@ -112,6 +112,8 @@ void GlowUpdater::apply(osg::StateSet *stateset, osg::NodeVisitor *nv)
|
|||
removeTexture(stateset);
|
||||
this->reset();
|
||||
mDone = true;
|
||||
// normally done in StateSetUpdater::operator(), but needs doing here so the shader visitor sees the right StateSet
|
||||
mNode->setStateSet(stateset);
|
||||
mResourceSystem->getSceneManager()->recreateShaders(mNode);
|
||||
}
|
||||
if (mOriginalDuration < 0) // if this glowupdater was originally a permanent glow
|
||||
|
|
Loading…
Reference in a new issue