From 5994334a0644beb51a9199df951d9742e179bfd3 Mon Sep 17 00:00:00 2001 From: Adrian Scripca Date: Sun, 24 Apr 2022 07:19:11 +0300 Subject: [PATCH] Small debugging improvements --- src/shader.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/shader.cpp b/src/shader.cpp index 1c02b63..0ce2f2c 100644 --- a/src/shader.cpp +++ b/src/shader.cpp @@ -14,7 +14,8 @@ void check_compile_error(GLuint shaderId) { char errorLog[maxLength]; glGetShaderInfoLog(shaderId, maxLength, &maxLength, &errorLog[0]); - LOG(ERROR) << "Shader compile error: (" << isCompiled << ") - " << std::string(errorLog); + LOG(ERROR) << "Shader compile error: " << "(id: " << shaderId << ", code: " << isCompiled << ", bytes: " + << maxLength << ") - " << std::string(errorLog, maxLength); //Provide the infolog in whatever manor you deem best. //Exit with failure. @@ -35,7 +36,8 @@ void check_link_error(GLuint program_id) { char errorLog[maxLength]; glGetShaderInfoLog(program_id, maxLength, &maxLength, &errorLog[0]); - LOG(ERROR) << "Shader program link error: " << "(" << is_linked << ") - " << std::string(errorLog); + LOG(ERROR) << "Shader program link error: " << "(id: " << program_id << ", code: " << is_linked << ", bytes: " + << maxLength << ") - " << std::string(errorLog, maxLength); //Provide the info log in whatever manner you deem best. //Exit with failure.