Optimize uniform parsing;
By only parsing the first uniform in an array.
@@ -1713,8 +1713,12 @@ static void lovrShaderSetupUniforms(Shader* shader) {
char* subscript = strchr(uniform.name, '[');
if (subscript) {
+ if (subscript[1] > '0') {
+ continue;
+ } else {
*subscript = '\0';
}
+ }
uniform.location = glGetUniformLocation(program, uniform.name);
uniform.type = getUniformType(glType, uniform.name);
