Skip to content

Commit

Permalink
print shader compile/link error logs
Browse files Browse the repository at this point in the history
  • Loading branch information
igagis committed Apr 21, 2024
1 parent 19b75fe commit 4bd8938
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/ruis/render/opengl/shader_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@ bool check_for_compile_errors(GLuint shader)
// NOLINTNEXTLINE(cppcoreguidelines-init-variables)
GLint len;
glGetShaderInfoLog(shader, GLsizei(log.size()), &len, log.data());
LOG([&](auto& o) {
utki::log([&](auto& o) {
o << "===Compile log===\n" << log.data() << std::endl;
})
});
} else {
LOG([&](auto& o) {
utki::log([&](auto& o) {
o << "Shader compile log is empty" << std::endl;
})
});
}
return true;
}
Expand All @@ -87,9 +87,9 @@ bool check_for_link_errors(GLuint program)
// NOLINTNEXTLINE(cppcoreguidelines-init-variables)
GLint len;
glGetProgramInfoLog(program, GLsizei(log.size()), &len, log.data());
LOG([&](auto& o) {
utki::log([&](auto& o) {
o << "===Link log===\n" << log.data() << std::endl;
})
});
}
return true;
}
Expand Down

0 comments on commit 4bd8938

Please sign in to comment.