Cleanup debug reporting situation
This commit is contained in:
@@ -75,8 +75,9 @@ void EndFrameRender(float wx, float wy, Color color) {
|
||||
}
|
||||
}
|
||||
|
||||
void ReportWarningf(const char *fmt, ...);
|
||||
void GLDebugCallback(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *message, const void *user) {
|
||||
printf("%s", message);
|
||||
ReportWarningf("OpenGL message: %s", message);
|
||||
if (severity == GL_DEBUG_SEVERITY_HIGH || severity == GL_DEBUG_SEVERITY_MEDIUM) {
|
||||
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "OpenGL error", message, NULL);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user