Stop viewer threading before changing MyGUI textures

c++11
scrawl 10 years ago
parent 00f4f78717
commit 483dc9de45

@ -1092,7 +1092,11 @@ namespace MWGui
else if (it->first == "GUI" && it->second == "subtitles")
mSubtitlesEnabled = Settings::Manager::getBool ("subtitles", "GUI");
else if (it->first == "GUI" && it->second == "menu transparency")
{
mViewer->stopThreading();
setMenuTransparency(Settings::Manager::getFloat("menu transparency", "GUI"));
mViewer->startThreading();
}
}
}

@ -42,6 +42,8 @@ namespace osgMyGUI
virtual void destroy();
/// @warning If you intend to change a texture during the frame update, you must either declare the texture with DataVariance::DYNAMIC
/// or temporarily stop the viewer threading, to prevent race conditions with the draw thread.
virtual void* lock(MyGUI::TextureUsage access);
virtual void unlock();
virtual bool isLocked();

Loading…
Cancel
Save