From 6cfabe252d3789f72377f07431b704f71df9c6c9 Mon Sep 17 00:00:00 2001 From: elsid Date: Thu, 2 Sep 2021 01:18:55 +0200 Subject: [PATCH] Remove redundant ShadowsBinAdder --- components/sceneutil/mwshadowtechnique.cpp | 2 +- components/sceneutil/shadowsbin.hpp | 7 ------- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/components/sceneutil/mwshadowtechnique.cpp b/components/sceneutil/mwshadowtechnique.cpp index 024123b3e1..60f048b147 100644 --- a/components/sceneutil/mwshadowtechnique.cpp +++ b/components/sceneutil/mwshadowtechnique.cpp @@ -282,7 +282,7 @@ void VDSMCameraCullCallback::operator()(osg::Node* node, osg::NodeVisitor* nv) static osg::ref_ptr ss; if (!ss) { - ShadowsBinAdder adder("ShadowsBin", _vdsm->getCastingPrograms()); + ShadowsBin::addPrototype("ShadowsBin", _vdsm->getCastingPrograms()); ss = new osg::StateSet; ss->setRenderBinDetails(osg::StateSet::OPAQUE_BIN, "ShadowsBin", osg::StateSet::OVERRIDE_PROTECTED_RENDERBIN_DETAILS); } diff --git a/components/sceneutil/shadowsbin.hpp b/components/sceneutil/shadowsbin.hpp index 1c63caf4bb..8775dc3139 100644 --- a/components/sceneutil/shadowsbin.hpp +++ b/components/sceneutil/shadowsbin.hpp @@ -67,13 +67,6 @@ namespace SceneUtil static void addPrototype(const std::string& name, const std::array, GL_ALWAYS - GL_NEVER + 1>& castingPrograms); }; - - class ShadowsBinAdder - { - public: - ShadowsBinAdder(const std::string& name, const std::array, GL_ALWAYS - GL_NEVER + 1>& castingPrograms){ ShadowsBin::addPrototype(name, castingPrograms); } - }; - } #endif