exit on shader error
This commit is contained in:
parent
bc909e185f
commit
1ecaa92766
|
@ -131,6 +131,7 @@ void init(void) {
|
||||||
GLchar infoLog[1024];
|
GLchar infoLog[1024];
|
||||||
glGetShaderInfoLog(vertexShader, 1024, NULL, infoLog);
|
glGetShaderInfoLog(vertexShader, 1024, NULL, infoLog);
|
||||||
printf("%s",infoLog);
|
printf("%s",infoLog);
|
||||||
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
vertexTextConst = NULL;
|
vertexTextConst = NULL;
|
||||||
|
@ -152,6 +153,7 @@ void init(void) {
|
||||||
GLchar infoLog[1024];
|
GLchar infoLog[1024];
|
||||||
glGetShaderInfoLog(fragmentShader, 1024, NULL, infoLog);
|
glGetShaderInfoLog(fragmentShader, 1024, NULL, infoLog);
|
||||||
printf("%s",infoLog);
|
printf("%s",infoLog);
|
||||||
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// create and link shader program
|
// create and link shader program
|
||||||
|
@ -167,6 +169,7 @@ void init(void) {
|
||||||
GLchar infoLog[1024];
|
GLchar infoLog[1024];
|
||||||
glGetProgramInfoLog(program, 1024, NULL, infoLog);
|
glGetProgramInfoLog(program, 1024, NULL, infoLog);
|
||||||
printf("%s",infoLog);
|
printf("%s",infoLog);
|
||||||
|
exit(1);
|
||||||
}
|
}
|
||||||
glValidateProgram(program);
|
glValidateProgram(program);
|
||||||
|
|
||||||
|
@ -178,6 +181,7 @@ void init(void) {
|
||||||
GLchar infoLog[1024];
|
GLchar infoLog[1024];
|
||||||
glGetProgramInfoLog(program, 1024, NULL, infoLog);
|
glGetProgramInfoLog(program, 1024, NULL, infoLog);
|
||||||
printf("%s",infoLog);
|
printf("%s",infoLog);
|
||||||
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue