exit on shader error

This commit is contained in:
Luca Conte 2024-05-16 16:31:31 +02:00
parent bc909e185f
commit 1ecaa92766
1 changed files with 4 additions and 0 deletions

View File

@ -131,6 +131,7 @@ void init(void) {
GLchar infoLog[1024];
glGetShaderInfoLog(vertexShader, 1024, NULL, infoLog);
printf("%s",infoLog);
exit(1);
}
vertexTextConst = NULL;
@ -152,6 +153,7 @@ void init(void) {
GLchar infoLog[1024];
glGetShaderInfoLog(fragmentShader, 1024, NULL, infoLog);
printf("%s",infoLog);
exit(1);
}
// create and link shader program
@ -167,6 +169,7 @@ void init(void) {
GLchar infoLog[1024];
glGetProgramInfoLog(program, 1024, NULL, infoLog);
printf("%s",infoLog);
exit(1);
}
glValidateProgram(program);
@ -178,6 +181,7 @@ void init(void) {
GLchar infoLog[1024];
glGetProgramInfoLog(program, 1024, NULL, infoLog);
printf("%s",infoLog);
exit(1);
}