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

@@ -20,6 +20,7 @@ namespace OpenRA.Platforms.Default
{
public const int VertexPosAttributeIndex = 0;
public const int TexCoordAttributeIndex = 1;
public const int TexMetadataAttributeIndex = 2;
readonly Dictionary<string, int> samplers = new Dictionary<string, int>();
readonly Dictionary<int, ITexture> textures = new Dictionary<int, ITexture>();
@@ -73,7 +74,8 @@ namespace OpenRA.Platforms.Default
OpenGL.CheckGLError();
OpenGL.glBindAttribLocation(program, TexCoordAttributeIndex, "aVertexTexCoord");
OpenGL.CheckGLError();
OpenGL.glBindAttribLocation(program, TexMetadataAttributeIndex, "aVertexTexMetadata");
OpenGL.CheckGLError();
OpenGL.glAttachShader(program, vertexShader);
OpenGL.CheckGLError();
OpenGL.glAttachShader(program, fragmentShader);