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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user