no file output on compilation error
This commit is contained in:
parent
4b3ea41034
commit
29c2dae6cb
1 changed files with 14 additions and 14 deletions
28
renderer.c
28
renderer.c
|
|
@ -74,20 +74,20 @@ GLuint load_shader(const char *path) {
|
|||
|
||||
GLuint shader = create_shader(string);
|
||||
|
||||
if (shader == 0) {
|
||||
// print file
|
||||
int line_count = 1;
|
||||
printf("%i\t", line_count);
|
||||
line_count++;
|
||||
for (int i = 0; i < length; i++) {
|
||||
printf("%c", string[i]);
|
||||
if (string[i] == '\n') {
|
||||
printf("%i\t", line_count);
|
||||
line_count++;
|
||||
}
|
||||
}
|
||||
printf("\n");
|
||||
}
|
||||
//if (shader == 0) {
|
||||
// // print file
|
||||
// int line_count = 1;
|
||||
// printf("%i\t", line_count);
|
||||
// line_count++;
|
||||
// for (int i = 0; i < length; i++) {
|
||||
// printf("%c", string[i]);
|
||||
// if (string[i] == '\n') {
|
||||
// printf("%i\t", line_count);
|
||||
// line_count++;
|
||||
// }
|
||||
// }
|
||||
// printf("\n");
|
||||
//}
|
||||
|
||||
free(string);
|
||||
return shader;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue