Minor improvement to gl_debug_log.h

This commit is contained in:
Henrik Rydgård committed 2020-09-17 20:53:02 +02:00
1 parent 277f0e4ec6
commit 7c76f4e65c
3 files changed
+9 -3

No files matched your search

+3 -1
View File
@@ -34,9 +34,11 @@ std::string GLEnumToString(uint16_t value) {
}
}
void CheckGLError(const char *file, int line) {
bool CheckGLError(const char *file, int line) {
GLenum err = glGetError();
if (err != GL_NO_ERROR) {
ERROR_LOG(G3D, "GL error %s on %s:%d", GLEnumToString(err).c_str(), file, line);
return false;
}
return true;
}