summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBret Curtis <psi29a@gmail.com>2021-02-04 17:08:57 +0100
committerBret Curtis <psi29a@gmail.com>2021-02-04 17:08:57 +0100
commit5aeb484a6b5cfb8fa2168cc985f9eca990f51269 (patch)
treed6ee8d15496c066e955dfc508d579665b9576f78
parentf8c068ee347d031fa810d22460bec99ad51a8859 (diff)
bump the number of lights in our list and see what happens; many opengl warningsbrute_force_lights
-rw-r--r--components/sceneutil/lightmanager.cpp8
1 files 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<osg::ref_ptr<osg::Light> >()));
}
@@ -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<DisableLight> defaultLight (new DisableLight(i));
getOrCreateStateSet()->setAttributeAndModes(defaultLight, osg::StateAttribute::OFF);
@@ -443,7 +443,7 @@ namespace SceneUtil
}
if (!mLightList.empty())
{
- unsigned int maxLights = static_cast<unsigned int> (8 - mLightManager->getStartLight());
+ unsigned int maxLights = static_cast<unsigned int> (32 - mLightManager->getStartLight());
osg::StateSet* stateset = nullptr;