From 741869d73aa8c9d0d9ae8f1c4ca2df32e235960a Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 13 Aug 2009 12:53:20 -0600 Subject: [PATCH] progs/util: ignore pre-defined uniforms in SetUniformValues() --- progs/util/shaderutil.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/progs/util/shaderutil.c b/progs/util/shaderutil.c index 233252112a6..489e71cc30c 100644 --- a/progs/util/shaderutil.c +++ b/progs/util/shaderutil.c @@ -153,7 +153,14 @@ SetUniformValues(GLuint program, struct uniform_info uniforms[]) glUniform4fv(uniforms[i].location, 1, uniforms[i].value); break; default: - abort(); + if (strncmp(uniforms[i].name, "gl_", 3) == 0) { + /* built-in uniform: ignore */ + } + else { + fprintf(stderr, + "Unexpected uniform data type in SetUniformValues\n"); + abort(); + } } } } -- 2.30.2