mojoshader_opengl.c
branchtrunk
changeset 313 f5aa15de1690
parent 312 a5c140ca79d4
child 321 d7fb4ccecf0b
--- a/mojoshader_opengl.c	Sat May 10 23:11:18 2008 -0400
+++ b/mojoshader_opengl.c	Sat May 10 23:11:51 2008 -0400
@@ -626,7 +626,7 @@
     MOJOSHADER_glProgram *retval = NULL;
     const GLhandleARB program = ctx->glCreateProgramObject();
     int numregs = 0;
-    int const_count = 0;
+    int consts = 0;
 
     if (vshader != NULL) ctx->glAttachObject(program, vshader->handle);
     if (pshader != NULL) ctx->glAttachObject(program, pshader->handle);
@@ -670,8 +670,8 @@
 
     if (vshader != NULL)
     {
-        if (const_count < vshader->parseData->constant_count)
-            const_count = vshader->parseData->constant_count;
+        if (consts < vshader->parseData->constant_count)
+            consts = vshader->parseData->constant_count;
         retval->attributes = (AttributeMap *) Malloc(sizeof (AttributeMap) *
                                         vshader->parseData->attribute_count);
         if (retval->attributes == NULL)
@@ -685,20 +685,20 @@
 
     if (pshader != NULL)
     {
-        if (const_count < pshader->parseData->constant_count)
-            const_count = pshader->parseData->constant_count;
+        if (consts < pshader->parseData->constant_count)
+            consts = pshader->parseData->constant_count;
 
         lookup_uniforms(retval, pshader);
         lookup_samplers(retval, vshader);
         pshader->refcount++;
     } // if
 
-    if (const_count > 0)    
+    if (consts > 0)    
     {
-        retval->constants = (GLfloat *) Malloc(sizeof (GLfloat) * const_count * 4);
+        retval->constants = (GLfloat *) Malloc(sizeof (GLfloat) * consts * 4);
         if (retval->constants == NULL)
             goto link_program_fail;
-        retval->constant_count = (uint32) const_count;
+        retval->constant_count = (uint32) consts;
     } // if
 
     return retval;