From 64bf51b28b93aeca4d52bba0080b8a41fe1d4357 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Tue, 13 May 2008 04:29:56 -0400 Subject: [PATCH] Fixed incorrect vertex shader attribute location lookup. We were using a->name instead of a[i].name. Fix from Nicholas Vining (thanks!). --HG-- branch : trunk --- mojoshader_opengl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mojoshader_opengl.c b/mojoshader_opengl.c index 74488591..7547b6a8 100644 --- a/mojoshader_opengl.c +++ b/mojoshader_opengl.c @@ -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];