GPU: Use CLOG to for debug output

This removes the escape color control caracters when the output
does not supports it (i.e: file output, windows cmd).
This commit is contained in:
2020-10-23 19:29:27 +02:00
committed by Howard Trickey
parent e856443c99
commit 0d1f65e516
7 changed files with 77 additions and 38 deletions

View File

@@ -134,13 +134,13 @@ GLuint GLShader::create_shader_stage(GLenum gl_stage, MutableSpan<const char *>
if (log[0] != '\0') {
switch (gl_stage) {
case GL_VERTEX_SHADER:
this->print_errors(sources, log, "VertShader");
this->print_log(sources, log, "VertShader", !status);
break;
case GL_GEOMETRY_SHADER:
this->print_errors(sources, log, "GeomShader");
this->print_log(sources, log, "GeomShader", !status);
break;
case GL_FRAGMENT_SHADER:
this->print_errors(sources, log, "FragShader");
this->print_log(sources, log, "FragShader", !status);
break;
}
}
@@ -186,7 +186,7 @@ bool GLShader::finalize(void)
char log[5000];
glGetProgramInfoLog(shader_program_, sizeof(log), NULL, log);
Span<const char *> sources;
this->print_errors(sources, log, "Linking");
this->print_log(sources, log, "Linking", true);
return false;
}