Small debugging improvements
This commit is contained in:
+4
-2
@@ -14,7 +14,8 @@ void check_compile_error(GLuint shaderId) {
|
|||||||
char errorLog[maxLength];
|
char errorLog[maxLength];
|
||||||
glGetShaderInfoLog(shaderId, maxLength, &maxLength, &errorLog[0]);
|
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.
|
//Provide the infolog in whatever manor you deem best.
|
||||||
//Exit with failure.
|
//Exit with failure.
|
||||||
@@ -35,7 +36,8 @@ void check_link_error(GLuint program_id) {
|
|||||||
char errorLog[maxLength];
|
char errorLog[maxLength];
|
||||||
glGetShaderInfoLog(program_id, maxLength, &maxLength, &errorLog[0]);
|
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.
|
//Provide the info log in whatever manner you deem best.
|
||||||
//Exit with failure.
|
//Exit with failure.
|
||||||
|
|||||||
Reference in New Issue
Block a user