Enable GL_DEBUG_OUTPUT

This commit is contained in:
Jérôme Leclercq 2020-08-09 18:43:44 +02:00
parent 777121dbce
commit 0313f2d0a6
1 changed files with 5 additions and 0 deletions

View File

@ -247,6 +247,11 @@ namespace Nz::GL
// Set debug callback (if supported)
if (glDebugMessageCallback)
{
glEnable(GL_DEBUG_OUTPUT);
#ifdef NAZARA_DEBUG
glEnable(GL_DEBUG_OUTPUT_SYNCHRONOUS);
#endif
glDebugMessageCallback([](GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar* message, const void* userParam)
{
const Context* context = static_cast<const Context*>(userParam);