progs/util: ignore pre-defined uniforms in SetUniformValues()
authorBrian Paul <brianp@vmware.com>
Thu, 13 Aug 2009 18:53:20 +0000 (12:53 -0600)
committerBrian Paul <brianp@vmware.com>
Thu, 13 Aug 2009 18:53:20 +0000 (12:53 -0600)
progs/util/shaderutil.c

index 233252112a699449ae93164a8a001efb57006f9a..489e71cc30cb4ee9eddee4b4baa5b297f56ba69d 100644 (file)
@@ -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();
+         }
       }
    }
 }