59 const MOJOSHADER_parseData *pd; |
59 const MOJOSHADER_parseData *pd; |
60 int retval = 0; |
60 int retval = 0; |
61 |
61 |
62 pd = MOJOSHADER_parse(prof, buf, len, NULL, 0, Malloc, Free, NULL); |
62 pd = MOJOSHADER_parse(prof, buf, len, NULL, 0, Malloc, Free, NULL); |
63 printf("PROFILE: %s\n", prof); |
63 printf("PROFILE: %s\n", prof); |
64 if (pd->error != NULL) |
64 if (pd->error_count > 0) |
65 printf("ERROR: (position %d) %s\n", pd->error_position, pd->error); |
65 { |
|
66 int i; |
|
67 for (i = 0; i < pd->error_count; i++) |
|
68 { |
|
69 printf("ERROR: (position %d) %s\n", |
|
70 pd->errors[i].error_position, |
|
71 pd->errors[i].error); |
|
72 } // for |
|
73 } // if |
66 else |
74 else |
67 { |
75 { |
68 retval = 1; |
76 retval = 1; |
69 printf("SHADER TYPE: %s\n", shader_type(pd->shader_type)); |
77 printf("SHADER TYPE: %s\n", shader_type(pd->shader_type)); |
70 printf("VERSION: %d.%d\n", pd->major_ver, pd->minor_ver); |
78 printf("VERSION: %d.%d\n", pd->major_ver, pd->minor_ver); |