diff --git a/components/sceneutil/lightmanager.cpp b/components/sceneutil/lightmanager.cpp index 5c81626d9b..9b63a9b825 100644 --- a/components/sceneutil/lightmanager.cpp +++ b/components/sceneutil/lightmanager.cpp @@ -756,16 +756,16 @@ namespace SceneUtil mTemplate->configureLayout(offsets[0], offsets[1], offsets[2], totalBlockSize, stride); } - const std::unordered_map LightManager::mLightingMethodSettingMap = { - {"legacy", LightingMethod::FFP} - ,{"shaders compatibility", LightingMethod::PerObjectUniform} - ,{"shaders", LightingMethod::SingleUBO} + const std::unordered_map LightManager::sLightingMethodSettingMap = { + {"legacy", LightingMethod::FFP}, + {"shaders compatibility", LightingMethod::PerObjectUniform}, + {"shaders", LightingMethod::SingleUBO}, }; LightingMethod LightManager::getLightingMethodFromString(const std::string& value) { - auto it = LightManager::mLightingMethodSettingMap.find(value); - if (it != LightManager::mLightingMethodSettingMap.end()) + auto it = LightManager::sLightingMethodSettingMap.find(value); + if (it != LightManager::sLightingMethodSettingMap.end()) return it->second; constexpr const char* fallback = "shaders compatibility"; @@ -775,7 +775,7 @@ namespace SceneUtil std::string LightManager::getLightingMethodString(LightingMethod method) { - for (const auto& p : LightManager::mLightingMethodSettingMap) + for (const auto& p : LightManager::sLightingMethodSettingMap) if (p.second == method) return p.first; return ""; @@ -801,7 +801,7 @@ namespace SceneUtil if (ffp) { - initFFP(mFFPMaxLights); + initFFP(sFFPMaxLights); return; } @@ -819,7 +819,7 @@ namespace SceneUtil hasLoggedWarnings = true; } - int targetLights = std::clamp(Settings::Manager::getInt("max lights", "Shaders"), mMaxLightsLowerLimit, mMaxLightsUpperLimit); + int targetLights = std::clamp(Settings::Manager::getInt("max lights", "Shaders"), sMaxLightsLowerLimit, sMaxLightsUpperLimit); if (!supportsUBO || !supportsGPU4 || lightingMethod == LightingMethod::PerObjectUniform) initPerObjectUniform(targetLights); @@ -902,7 +902,7 @@ namespace SceneUtil if (usingFFP()) return; - setMaxLights(std::clamp(Settings::Manager::getInt("max lights", "Shaders"), mMaxLightsLowerLimit, mMaxLightsUpperLimit)); + setMaxLights(std::clamp(Settings::Manager::getInt("max lights", "Shaders"), sMaxLightsLowerLimit, sMaxLightsUpperLimit)); if (getLightingMethod() == LightingMethod::PerObjectUniform) { diff --git a/components/sceneutil/lightmanager.hpp b/components/sceneutil/lightmanager.hpp index b4d4755056..ba226cb7ef 100644 --- a/components/sceneutil/lightmanager.hpp +++ b/components/sceneutil/lightmanager.hpp @@ -360,11 +360,11 @@ namespace SceneUtil SupportedMethods mSupported; - static constexpr auto mMaxLightsLowerLimit = 2; - static constexpr auto mMaxLightsUpperLimit = 64; - static constexpr auto mFFPMaxLights = 8; + static constexpr auto sMaxLightsLowerLimit = 2; + static constexpr auto sMaxLightsUpperLimit = 64; + static constexpr auto sFFPMaxLights = 8; - static const std::unordered_map mLightingMethodSettingMap; + static const std::unordered_map sLightingMethodSettingMap; std::shared_ptr mPPLightBuffer; };