From 5aeb484a6b5cfb8fa2168cc985f9eca990f51269 Mon Sep 17 00:00:00 2001 From: Bret Curtis Date: Thu, 4 Feb 2021 17:08:57 +0100 Subject: [PATCH] bump the number of lights in our list and see what happens; many opengl warnings --- components/sceneutil/lightmanager.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/components/sceneutil/lightmanager.cpp b/components/sceneutil/lightmanager.cpp index 2ebce241d5..73bd418ce4 100644 --- a/components/sceneutil/lightmanager.cpp +++ b/components/sceneutil/lightmanager.cpp @@ -10,7 +10,7 @@ namespace SceneUtil class LightStateCache { public: - osg::Light* lastAppliedLight[8]; + osg::Light* lastAppliedLight[32]; }; LightStateCache* getLightStateCache(unsigned int contextid) @@ -165,7 +165,7 @@ namespace SceneUtil , mLightingMask(~0u) { setUpdateCallback(new LightManagerUpdateCallback); - for (unsigned int i=0; i<8; ++i) + for (unsigned int i=0; i<32; ++i) mDummies.push_back(new LightStateAttribute(i, std::vector >())); } @@ -341,7 +341,7 @@ namespace SceneUtil // Set default light state to zero // This is necessary because shaders don't respect glDisable(GL_LIGHTX) so in addition to disabling // we'll have to set a light state that has no visible effect - for (int i=start; i<8; ++i) + for (int i=start; i<32; ++i) { osg::ref_ptr defaultLight (new DisableLight(i)); getOrCreateStateSet()->setAttributeAndModes(defaultLight, osg::StateAttribute::OFF); @@ -443,7 +443,7 @@ namespace SceneUtil } if (!mLightList.empty()) { - unsigned int maxLights = static_cast (8 - mLightManager->getStartLight()); + unsigned int maxLights = static_cast (32 - mLightManager->getStartLight()); osg::StateSet* stateset = nullptr;