Automatically flush line renderer when changing width.

This commit is contained in:
Paul Chote
2013-10-14 23:24:01 +13:00
parent 24b33891a7
commit d2d73a32a2
2 changed files with 18 additions and 16 deletions

View File

@@ -49,20 +49,10 @@ namespace OpenRA.Graphics
var src = wr.ScreenPosition(pos);
var dest = wr.ScreenPosition(pos + length);
var lineWidth = wlr.LineWidth;
if (lineWidth != width)
{
wlr.Flush();
wlr.LineWidth = width;
}
var oldWidth = wlr.LineWidth;
wlr.LineWidth = width;
wlr.DrawLine(src, dest, color, color);
if (lineWidth != width)
{
wlr.Flush();
wlr.LineWidth = lineWidth;
}
wlr.LineWidth = oldWidth;
}
public void RenderDebugGeometry(WorldRenderer wr) {}