Skip to content

Commit

Permalink
Use switch statement with lighting enum.
Browse files Browse the repository at this point in the history
  • Loading branch information
afritz1 committed Jul 28, 2024
1 parent b3cde4c commit d9f1ab2
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions OpenTESArena/src/Rendering/SoftwareRenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3367,13 +3367,14 @@ namespace
static_assert(RenderLightingType::PerPixel == RENDER_LIGHTING_TYPE_MAX);
const RenderLightingType lightingType = drawCallCache.lightingType;

if (lightingType == RenderLightingType::PerMesh)
switch (lightingType)
{
case RenderLightingType::PerMesh:
RasterizeMeshDispatchPixelShaderType<RenderLightingType::PerMesh>(drawCallCache, rasterizerInputCache, bin, binEntry, binX, binY, binIndex);
}
else if (lightingType == RenderLightingType::PerPixel)
{
break;
case RenderLightingType::PerPixel:
RasterizeMeshDispatchPixelShaderType<RenderLightingType::PerPixel>(drawCallCache, rasterizerInputCache, bin, binEntry, binX, binY, binIndex);
break;
}
}
}
Expand Down

0 comments on commit d9f1ab2

Please sign in to comment.