Navigation Menu

Skip to content

Commit

Permalink
Fix lack of highlighting in XY view when using addLitRenderable()
Browse files Browse the repository at this point in the history
The XYRenderer's addLitRenderable() was ignoring the highlight shaders,
resulting in objects not appearing highlighted when selected. XYRenderer is now
refactored so that addLitRenderable() just calls the legacy addRenderable()
method (since the lighting is unimportant anyway).
  • Loading branch information
Matthew Mott committed Dec 1, 2020
1 parent 64d7cb9 commit 8e89d0b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions radiant/xyview/XYRenderer.h
Expand Up @@ -55,19 +55,19 @@ class XYRenderer: public RenderableCollector

void addRenderable(Shader& shader,
const OpenGLRenderable& renderable,
const Matrix4& world, const LightSources* lights,
const Matrix4& world, const LightSources*,
const IRenderEntity* entity) override
{
if (_state.highlightPrimitives)
{
if (_state.highlightAsGroupMember)
_selectedShaderGroup->addRenderable(renderable, world,
lights, entity);
nullptr, entity);
else
_selectedShader->addRenderable(renderable, world, lights, entity);
_selectedShader->addRenderable(renderable, world, nullptr, entity);
}

shader.addRenderable(renderable, world, lights, entity);
shader.addRenderable(renderable, world, nullptr, entity);
}

void addLitRenderable(Shader& shader,
Expand All @@ -76,7 +76,7 @@ class XYRenderer: public RenderableCollector
const LitObject& /* litObject */,
const IRenderEntity* entity = nullptr) override
{
shader.addRenderable(renderable, localToWorld, nullptr, entity);
addRenderable(shader, renderable, localToWorld, nullptr, entity);
}

void render(const Matrix4& modelview, const Matrix4& projection)
Expand Down

0 comments on commit 8e89d0b

Please sign in to comment.