OpenGLRenderer: Disable notification messages

This commit is contained in:
Jérôme Leclercq 2021-07-09 12:36:00 +02:00
parent 56776c19c4
commit 681cf31b66
2 changed files with 5 additions and 0 deletions

View File

@ -55,6 +55,7 @@ typedef void (GL_APIENTRYP PFNGLSPECIALIZESHADERARBPROC) (GLuint shader, const G
cb(glCreateProgram, PFNGLCREATEPROGRAMPROC) \
cb(glCreateShader, PFNGLCREATESHADERPROC) \
cb(glCullFace, PFNGLCULLFACEPROC) \
cb(glDebugMessageControl, PFNGLDEBUGMESSAGECONTROLPROC) \
cb(glDeleteBuffers, PFNGLDELETEBUFFERSPROC) \
cb(glDeleteFramebuffers, PFNGLDELETEFRAMEBUFFERSPROC) \
cb(glDeleteProgram, PFNGLDELETEPROGRAMPROC) \

View File

@ -353,6 +353,10 @@ namespace Nz::GL
const Context* context = static_cast<const Context*>(userParam);
context->HandleDebugMessage(source, type, id, severity, length, message);
}, this);
// Disable driver notifications (NVidia driver is very verbose)
if (glDebugMessageControl)
glDebugMessageControl(GL_DONT_CARE, GL_DONT_CARE, GL_DEBUG_SEVERITY_NOTIFICATION, 0, nullptr, GL_FALSE);
}
GLint maxTextureUnits = -1;