Skip to content

Commit

Permalink
Fixed incorrect vertex shader attribute location lookup.
Browse files Browse the repository at this point in the history
We were using a->name instead of a[i].name.

Fix from Nicholas Vining (thanks!).

--HG--
branch : trunk
  • Loading branch information
icculus committed May 13, 2008
1 parent 828a472 commit 64bf51b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mojoshader_opengl.c
Expand Up @@ -605,7 +605,7 @@ static void lookup_attributes(MOJOSHADER_glProgram *program)

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];
Expand Down

0 comments on commit 64bf51b

Please sign in to comment.