mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-24 05:00:31 -04:00
Merge branch 'properly_initialize_lightsettings' into 'master'
Properly initialize light settings See merge request OpenMW/openmw!1083 (cherry picked from commit 1f8209158baf6301048bf023651e9b38a9a099b3) 1e52ca2b properly initialize light settings
This commit is contained in:
parent
10b799653b
commit
93f495ecb5
@ -884,8 +884,6 @@ namespace SceneUtil
|
|||||||
std::string lightingMethodString = Settings::Manager::getString("lighting method", "Shaders");
|
std::string lightingMethodString = Settings::Manager::getString("lighting method", "Shaders");
|
||||||
auto lightingMethod = LightManager::getLightingMethodFromString(lightingMethodString);
|
auto lightingMethod = LightManager::getLightingMethodFromString(lightingMethodString);
|
||||||
|
|
||||||
updateSettings();
|
|
||||||
|
|
||||||
static bool hasLoggedWarnings = false;
|
static bool hasLoggedWarnings = false;
|
||||||
|
|
||||||
if (lightingMethod == LightingMethod::SingleUBO && !hasLoggedWarnings)
|
if (lightingMethod == LightingMethod::SingleUBO && !hasLoggedWarnings)
|
||||||
@ -904,6 +902,8 @@ namespace SceneUtil
|
|||||||
else
|
else
|
||||||
initSingleUBO(targetLights);
|
initSingleUBO(targetLights);
|
||||||
|
|
||||||
|
updateSettings();
|
||||||
|
|
||||||
getOrCreateStateSet()->addUniform(new osg::Uniform("PointLightCount", 0));
|
getOrCreateStateSet()->addUniform(new osg::Uniform("PointLightCount", 0));
|
||||||
|
|
||||||
addCullCallback(new LightManagerCullCallback(this));
|
addCullCallback(new LightManagerCullCallback(this));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user