mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-20 07:30:26 +00:00
glhr:: more informative messages on shader compile failure with -dgl
This commit is contained in:
parent
9ebd7d98d5
commit
0c048ea53b
8
glhr.cpp
8
glhr.cpp
@ -338,9 +338,13 @@ EX int compileShader(int type, const string& s) {
|
|||||||
if (logLength > 0) {
|
if (logLength > 0) {
|
||||||
std::vector<char> log(logLength);
|
std::vector<char> log(logLength);
|
||||||
glGetShaderInfoLog(shader, logLength, &logLength, log.data());
|
glGetShaderInfoLog(shader, logLength, &logLength, log.data());
|
||||||
|
string s = log.data();
|
||||||
if(logLength > 0)
|
if(logLength > 0)
|
||||||
printf("compiler log (%d): '%s'\n", logLength, log.data());
|
println(hlog, "compiler log (", logLength, "): \n", s);
|
||||||
if(debug_gl) exit(1);
|
if(debug_gl) {
|
||||||
|
println(hlog, "failed to compile shader -- exit called");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
glGetShaderiv(shader, GL_COMPILE_STATUS, &status);
|
glGetShaderiv(shader, GL_COMPILE_STATUS, &status);
|
||||||
|
Loading…
Reference in New Issue
Block a user