Add a secondary texture coordinate to Vertex.

This commit is contained in:
Paul Chote
2016-04-10 12:46:31 -04:00
parent f07a5d6f69
commit 7c67b10d28
11 changed files with 59 additions and 47 deletions

View File

@@ -16,14 +16,15 @@ namespace OpenRA.Graphics
[StructLayout(LayoutKind.Sequential)]
public struct Vertex
{
public readonly float X, Y, Z, U, V, P, C;
public readonly float X, Y, Z, S, T, U, V, P, C;
public Vertex(float3 xyz, float u, float v, float p, float c)
: this(xyz.X, xyz.Y, xyz.Z, u, v, p, c) { }
public Vertex(float3 xyz, float s, float t, float u, float v, float p, float c)
: this(xyz.X, xyz.Y, xyz.Z, s, t, u, v, p, c) { }
public Vertex(float x, float y, float z, float u, float v, float p, float c)
public Vertex(float x, float y, float z, float s, float t, float u, float v, float p, float c)
{
X = x; Y = y; Z = z;
S = s; T = t;
U = u; V = v;
P = p; C = c;
}