Fixed incorrect vertex shader attribute location lookup. trunk
authorRyan C. Gordon <icculus@icculus.org>
Tue, 13 May 2008 04:29:56 -0400
branchtrunk
changeset 321 d7fb4ccecf0b
parent 320 e05b21866d5a
child 322 92b8f994bdc5
Fixed incorrect vertex shader attribute location lookup. We were using a->name instead of a[i].name. Fix from Nicholas Vining (thanks!).
mojoshader_opengl.c
--- a/mojoshader_opengl.c	Mon May 12 02:58:22 2008 -0400
+++ b/mojoshader_opengl.c	Tue May 13 04:29:56 2008 -0400
@@ -605,7 +605,7 @@
 
     for (i = 0; i < pd->attribute_count; i++)
     {
-        const GLint loc = ctx->glGetAttribLocation(program->handle, a->name);
+        const GLint loc = ctx->glGetAttribLocation(program->handle, a[i].name);
         if (loc != -1)  // maybe the Attribute was optimized out?
         {
             AttributeMap *map = &program->attributes[program->attribute_count];