Skip to content

Commit

Permalink
#5893: Remove unused locals
Browse files Browse the repository at this point in the history
  • Loading branch information
codereader committed Feb 25, 2022
1 parent a067d34 commit 916cc08
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
14 changes: 2 additions & 12 deletions radiantcore/rendersystem/backend/LightInteractions.cpp
Expand Up @@ -85,8 +85,6 @@ void LightInteractions::fillDepthBuffer(OpenGLState& state, RenderStateFlags glo
// Apply our state to the current state object
shader->getDepthFillPass()->applyState(state, globalFlagsMask, view.getViewer(), renderTime, entity);

RenderInfo info(state.getRenderFlags(), view.getViewer(), state.cubeMapMode);

for (auto object : objectList)
{
ObjectRenderer::SubmitObject(object.get(), _store);
Expand All @@ -109,25 +107,17 @@ void LightInteractions::render(OpenGLState& state, RenderStateFlags globalFlagsM
for (auto& pair : pair.second)
{
auto shader = pair.first;
auto& objectList = pair.second;

if (!shader->isVisible()) continue;

auto pass = shader->getInteractionPass();

if (pass)
if (pass && pass->stateIsActive())
{
if (!pass->stateIsActive())
{
continue;
}

// Apply our state to the current state object
pass->applyState(state, globalFlagsMask, view.getViewer(), renderTime, entity);

RenderInfo info(state.getRenderFlags(), view.getViewer(), state.cubeMapMode);

for (auto object : objectList)
for (auto object : pair.second)
{
if (state.glProgram)
{
Expand Down
2 changes: 0 additions & 2 deletions radiantcore/rendersystem/backend/LightingModeRenderer.cpp
Expand Up @@ -97,8 +97,6 @@ IRenderResult::Ptr LightingModeRenderer::render(RenderStateFlags globalFlagsMask
// Apply our state to the current state object
pass.applyState(current, globalFlagsMask, view.getViewer(), time, entity.get());

RenderInfo info(current.getRenderFlags(), view.getViewer(), current.cubeMapMode);

if (current.glProgram)
{
OpenGLShaderPass::SetUpNonInteractionProgram(current, view.getViewer(), object->getObjectTransform());
Expand Down

0 comments on commit 916cc08

Please sign in to comment.