Skip to content

Commit

Permalink
Fixed missing shader in CMiniMap::DrawCameraFrustumAndMouseSelection(…
Browse files Browse the repository at this point in the history
…) causing dark/missing minimap selection box
  • Loading branch information
lhog committed Nov 6, 2022
1 parent fb3dea2 commit 99ca831
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions rts/Game/UI/MiniMap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1339,7 +1339,6 @@ void CMiniMap::DrawCameraFrustumAndMouseSelection()


// selection box
glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
CMouseHandler::ButtonPressEvt& bp = mouse->buttons[SDL_BUTTON_LEFT];
if (selecting && fullProxy && (bp.movement > mouse->dragSelectionThreshold)) {
const float3 oldMapPos = GetMapPosition(bp.x, bp.y);
Expand All @@ -1355,8 +1354,11 @@ void CMiniMap::DrawCameraFrustumAndMouseSelection()
{newMapPos.x, newMapPos.z},
{oldMapPos.x, newMapPos.z}
});
sh.Enable();
sh.SetUniform("ucolor", cmdColors.mouseBox[0], cmdColors.mouseBox[1], cmdColors.mouseBox[2], cmdColors.mouseBox[3]);
rb.DrawArrays(GL_LINE_LOOP);

sh.SetUniform("ucolor", 1.0f, 1.0f, 1.0f, 1.0f);
sh.Disable();
glLineWidth(1.0f);
//glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
}
Expand Down

0 comments on commit 99ca831

Please sign in to comment.