glGetAttribLocation always returned 1 (bug 11774)

This commit is contained in:
Brian 2007-07-31 09:29:31 -06:00
parent 3c182c5bc8
commit aa5b748c10
2 changed files with 4 additions and 1 deletions

View file

@ -46,6 +46,7 @@ the terminating zero (bug 11588)
<li>glXChooseFBConfig() in Xlib driver didn't handle GLX_STEREO flag properly
<li>Fixed a GLSL function call bug (#11731)
<li>glPointParameteriv(GL_DISTANCE_ATTENUATION_EXT) didn't work (bug 11754)
<li>glGetAttribLocation() always returned 1 (bug 11774)
</ul>

View file

@ -329,8 +329,10 @@ _slang_resolve_attributes(struct gl_shader_program *shProg,
* glVertex/position.
*/
for (attr = 1; attr < MAX_VERTEX_ATTRIBS; attr++) {
if (((1 << attr) & usedAttributes) == 0)
if (((1 << attr) & usedAttributes) == 0) {
usedAttributes |= (1 << attr);
break;
}
}
if (attr == MAX_VERTEX_ATTRIBS) {
/* too many! XXX record error log */