Changed Vertex constructors to pass more parameters as plain floats.

This avoids callers having to construct a float2 struct, only to have the Vertex constructor unwrap it into individual components again.
This commit is contained in:
RoosterDragon
2014-10-10 09:38:14 +01:00
parent 31a096dcf1
commit 69125989ab
6 changed files with 32 additions and 46 deletions

View File

@@ -77,12 +77,12 @@ namespace OpenRA.Graphics
Flush();
vertices[nv++] = new Vertex(start + offset,
new float2(startColor.R / 255.0f, startColor.G / 255.0f),
new float2(startColor.B / 255.0f, startColor.A / 255.0f));
startColor.R / 255.0f, startColor.G / 255.0f,
startColor.B / 255.0f, startColor.A / 255.0f);
vertices[nv++] = new Vertex(end + offset,
new float2(endColor.R / 255.0f, endColor.G / 255.0f),
new float2(endColor.B / 255.0f, endColor.A / 255.0f));
endColor.R / 255.0f, endColor.G / 255.0f,
endColor.B / 255.0f, endColor.A / 255.0f);
}
public void FillRect(RectangleF r, Color color)