Expose vertex components.
This commit is contained in:
@@ -15,24 +15,19 @@ namespace OpenRA.Graphics
|
|||||||
[StructLayout(LayoutKind.Sequential)]
|
[StructLayout(LayoutKind.Sequential)]
|
||||||
public struct Vertex
|
public struct Vertex
|
||||||
{
|
{
|
||||||
// TODO Workaround for unused field warnings in mono 2.10
|
public readonly float X, Y, Z, U, V, P, C;
|
||||||
#pragma warning disable 414
|
|
||||||
float x, y, z, u, v;
|
|
||||||
float p, c;
|
|
||||||
#pragma warning restore
|
|
||||||
|
|
||||||
public Vertex(float2 xy, float u, float v, float p, float c)
|
public Vertex(float2 xy, float u, float v, float p, float c)
|
||||||
{
|
: this(xy.X, xy.Y, 0, u, v, p, c) { }
|
||||||
this.x = xy.X; this.y = xy.Y; this.z = 0;
|
|
||||||
this.u = u; this.v = v;
|
|
||||||
this.p = p; this.c = c;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Vertex(float[] xyz, float u, float v, float p, float c)
|
public Vertex(float[] xyz, float u, float v, float p, float c)
|
||||||
|
: this(xyz[0], xyz[1], xyz[2], u, v, p, c) { }
|
||||||
|
|
||||||
|
public Vertex(float x, float y, float z, float u, float v, float p, float c)
|
||||||
{
|
{
|
||||||
this.x = xyz[0]; this.y = xyz[1]; this.z = xyz[2];
|
X = x; Y = y; Z = z;
|
||||||
this.u = u; this.v = v;
|
U = u; V = v;
|
||||||
this.p = p; this.c = c;
|
P = p; C = c;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user