Support nested scissor rectangles.

This commit is contained in:
Paul Chote
2013-10-23 18:40:04 +13:00
parent b31daf23ca
commit 94554d7678
8 changed files with 28 additions and 12 deletions

View File

@@ -156,7 +156,7 @@ namespace OpenRA.Mods.RA.Widgets
var tl = CellToMinimapPixel(worldRenderer.Position(worldRenderer.Viewport.TopLeft).ToCPos());
var br = CellToMinimapPixel(worldRenderer.Position(worldRenderer.Viewport.BottomRight).ToCPos());
Game.Renderer.EnableScissor(mapRect.Left, mapRect.Top, mapRect.Width, mapRect.Height);
Game.Renderer.EnableScissor(mapRect);
Game.Renderer.LineRenderer.DrawRect(tl, br, Color.White);
Game.Renderer.DisableScissor();
}