SDL: Make GL debug output less noisy in Release

This commit is contained in:
Connor McLaughlin 2019-09-14 23:49:21 +10:00
parent b5d51f47cd
commit 03bd135060
1 changed files with 15 additions and 1 deletions

View File

@ -54,7 +54,21 @@ bool SDLInterface::CreateSDLWindow()
static void APIENTRY GLDebugCallback(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length,
const GLchar* message, const void* userParam)
{
Log_InfoPrintf("%s", message);
switch (severity)
{
case GL_DEBUG_SEVERITY_HIGH_KHR:
Log_InfoPrint(message);
break;
case GL_DEBUG_SEVERITY_MEDIUM_KHR:
Log_WarningPrint(message);
break;
case GL_DEBUG_SEVERITY_LOW_KHR:
Log_InfoPrintf(message);
break;
case GL_DEBUG_SEVERITY_NOTIFICATION:
Log_DebugPrint(message);
break;
}
}
bool SDLInterface::CreateGLContext()