From: Mikko Rasa Date: Sat, 27 Sep 2014 10:44:51 +0000 (+0300) Subject: Fix uniform stride assignments X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=82bb8a7a23e4010e8aea7f2a7cd128ca0f3b7101;p=libs%2Fgl.git Fix uniform stride assignments --- diff --git a/source/program.cpp b/source/program.cpp index e16776f8..3562507e 100644 --- a/source/program.cpp +++ b/source/program.cpp @@ -196,7 +196,7 @@ void Program::link() { glGetActiveUniformsiv(id, indices2.size(), &indices2[0], GL_UNIFORM_ARRAY_STRIDE, &values[0]); for(unsigned j=0; jarray_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; jmatrix_stride = values[j]; + uniforms_by_index[indices2[j]]->matrix_stride = values[j]; } sort(info.uniforms.begin(), info.uniforms.end(), uniform_location_compare);