]> git.tdb.fi Git - libs/gl.git/commitdiff
Fix uniform stride assignments
authorMikko Rasa <tdb@tdb.fi>
Sat, 27 Sep 2014 10:44:51 +0000 (13:44 +0300)
committerMikko Rasa <tdb@tdb.fi>
Sat, 27 Sep 2014 10:44:51 +0000 (13:44 +0300)
source/program.cpp

index e16776f8f53f078a2ae53c39b482326a9e8b16cc..3562507ecc2f8c021a92d9f822f28bbd040480a9 100644 (file)
@@ -196,7 +196,7 @@ void Program::link()
                        {
                                glGetActiveUniformsiv(id, indices2.size(), &indices2[0], GL_UNIFORM_ARRAY_STRIDE, &values[0]);
                                for(unsigned j=0; j<indices2.size(); ++j)
-                                       uniforms_by_index[indices[j]]->array_stride = values[j];
+                                       uniforms_by_index[indices2[j]]->array_stride = values[j];
                        }
 
                        indices2.clear();
@@ -212,7 +212,7 @@ void Program::link()
                        {
                                glGetActiveUniformsiv(id, indices2.size(), &indices2[0], GL_UNIFORM_MATRIX_STRIDE, &values[0]);
                                for(unsigned j=0; j<indices2.size(); ++j)
-                                       uniforms_by_index[indices[j]]->matrix_stride = values[j];
+                                       uniforms_by_index[indices2[j]]->matrix_stride = values[j];
                        }
 
                        sort(info.uniforms.begin(), info.uniforms.end(), uniform_location_compare);