testparse.c
branchtrunk
changeset 94 57adfb4769a0
parent 92 bc1bb138e855
child 97 4a41e3d17297
equal deleted inserted replaced
93:fb4f31787e6f 94:57adfb4769a0
    58         printf("UNIFORMS:");
    58         printf("UNIFORMS:");
    59         if (pd->uniform_count == 0)
    59         if (pd->uniform_count == 0)
    60             printf(" (none.)\n");
    60             printf(" (none.)\n");
    61         else
    61         else
    62         {
    62         {
    63             static const char *typenames[] = { "float", "int", "bool" };
       
    64             int i;
    63             int i;
    65             printf("\n");
    64             printf("\n");
    66             for (i = 0; i < pd->uniform_count; i++)
    65             for (i = 0; i < pd->uniform_count; i++)
    67             {
    66             {
       
    67                 static const char *typenames[] = { "float", "int", "bool" };
    68                 const MOJOSHADER_uniform *u = &pd->uniforms[i];
    68                 const MOJOSHADER_uniform *u = &pd->uniforms[i];
    69                 const char *name = u->name ? u->name : "";
    69                 printf("    * %d: %s\n", u->index, typenames[(int) u->type]);
    70                 const char *typestr = typenames[(int) u->type];
       
    71                 printf("    * %d: %s %s\n", u->index, typestr, name);
       
    72             } // for
    70             } // for
    73         } // else
    71         } // else
    74 
    72 
    75         if (pd->output != NULL)
    73         if (pd->output != NULL)
    76             printf("OUTPUT:\n%s\n", pd->output);
    74             printf("OUTPUT:\n%s\n", pd->output);