Cleanup debug reporting situation

This commit is contained in:
2025-08-21 08:46:58 +02:00
parent 48574d634c
commit 8408f400c8
9 changed files with 29 additions and 34 deletions

View File

@@ -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);
}