1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-06-24 12:11:34 +00:00

Merge branch 'properly_initialize_lightsettings' into 'master'

Properly initialize light settings

See merge request OpenMW/openmw!1083
This commit is contained in:
psi29a 2021-08-02 07:51:53 +00:00
commit 1f8209158b

View file

@ -884,8 +884,6 @@ namespace SceneUtil
std::string lightingMethodString = Settings::Manager::getString("lighting method", "Shaders");
auto lightingMethod = LightManager::getLightingMethodFromString(lightingMethodString);
updateSettings();
static bool hasLoggedWarnings = false;
if (lightingMethod == LightingMethod::SingleUBO && !hasLoggedWarnings)
@ -904,6 +902,8 @@ namespace SceneUtil
else
initSingleUBO(targetLights);
updateSettings();
getOrCreateStateSet()->addUniform(new osg::Uniform("PointLightCount", 0));
addCullCallback(new LightManagerCullCallback(this));