testparse.c
branchtrunk
changeset 92 bc1bb138e855
parent 53 8c856f73908e
child 94 57adfb4769a0
equal deleted inserted replaced
91:3ae89caee681 92:bc1bb138e855
    53     else
    53     else
    54     {
    54     {
    55         printf("SHADER TYPE: %s\n", shader_type(pd->shader_type));
    55         printf("SHADER TYPE: %s\n", shader_type(pd->shader_type));
    56         printf("VERSION: %d.%d\n", pd->major_ver, pd->minor_ver);
    56         printf("VERSION: %d.%d\n", pd->major_ver, pd->minor_ver);
    57         printf("INSTRUCTION COUNT: %d\n", (int) pd->instruction_count);
    57         printf("INSTRUCTION COUNT: %d\n", (int) pd->instruction_count);
       
    58         printf("UNIFORMS:");
       
    59         if (pd->uniform_count == 0)
       
    60             printf(" (none.)\n");
       
    61         else
       
    62         {
       
    63             static const char *typenames[] = { "float", "int", "bool" };
       
    64             int i;
       
    65             printf("\n");
       
    66             for (i = 0; i < pd->uniform_count; i++)
       
    67             {
       
    68                 const MOJOSHADER_uniform *u = &pd->uniforms[i];
       
    69                 const char *name = u->name ? u->name : "";
       
    70                 const char *typestr = typenames[(int) u->type];
       
    71                 printf("    * %d: %s %s\n", u->index, typestr, name);
       
    72             } // for
       
    73         } // else
       
    74 
    58         if (pd->output != NULL)
    75         if (pd->output != NULL)
    59             printf("OUTPUT:\n%s\n", pd->output);
    76             printf("OUTPUT:\n%s\n", pd->output);
    60     } // else
    77     } // else
    61     printf("\n\n");
    78     printf("\n\n");
    62     MOJOSHADER_freeParseData(pd);
    79     MOJOSHADER_freeParseData(pd);