Remove draw line 2D helper method.

Callers can provide 3D points easily, and this avoids the need to allocate and slow down enumeration via the points.Select(p => new float3(p, 0)) wrapper.
This commit is contained in:
RoosterDragon
2017-12-15 19:22:20 +00:00
committed by reaperrr
parent de38313579
commit a9d1d374b8
4 changed files with 7 additions and 12 deletions

View File

@@ -46,8 +46,8 @@ namespace OpenRA.Mods.Common.Graphics
{
var iz = 1 / wr.Viewport.Zoom;
var screenDepth = wr.Screen3DPxPosition(pos).Z;
var tl = new float2(decorationBounds.Left, decorationBounds.Top);
var br = new float2(decorationBounds.Right, decorationBounds.Bottom);
var tl = new float3(decorationBounds.Left, decorationBounds.Top, 0);
var br = new float3(decorationBounds.Right, decorationBounds.Bottom, 0);
var tr = new float3(br.X, tl.Y, screenDepth);
var bl = new float3(tl.X, br.Y, screenDepth);
var u = new float2(4 * iz, 0);