]> git.tdb.fi Git - libs/gl.git/blobdiff - source/core/program.cpp
Set array and matrix strides for default-block uniforms
[libs/gl.git] / source / core / program.cpp
index 4e09038074613d64f0d5559127e51df305a156c2..919fceebe68eee80081116b1ab65397250056303 100644 (file)
@@ -344,6 +344,9 @@ void Program::query_uniforms()
                {
                        u.location = glGetUniformLocation(id, u.name.c_str());
                        u.block = &default_block;
+                       u.array_stride = get_type_size(u.type);
+                       if(is_matrix(u.type))
+                               u.matrix_stride = get_type_size(get_matrix_column_type(u.type));
                        default_block.uniforms.push_back(&u);
 
                        if(is_image(u.type) && u.location>=0)