testparse.c
branchtrunk
changeset 280 61b2abd9c927
parent 278 5c432d216078
child 438 73492129c1af
--- a/testparse.c	Sat May 03 20:08:46 2008 -0400
+++ b/testparse.c	Mon May 05 02:50:19 2008 -0400
@@ -140,7 +140,17 @@
             {
                 static const char *typenames[] = { "float", "int", "bool" };
                 const MOJOSHADER_uniform *u = &pd->uniforms[i];
-                printf("    * %d: %s", u->index, typenames[(int) u->type]);
+                const char *arrayof = "";
+                char arrayrange[64] = { '\0' };
+                if (u->array_count > 0)
+                {
+                    arrayof = "array[";
+                    snprintf(arrayrange, sizeof (arrayrange), "%d] ",
+                             u->array_count);
+                } // if
+
+                printf("    * %d: %s%s%s", u->index, arrayof, arrayrange,
+                        typenames[(int) u->type]);
                 if (u->name != NULL)
                     printf(" (\"%s\")", u->name);
                 printf("\n");