added check for debug callback

This commit is contained in:
Nico Schertler 2018-11-13 10:40:59 +01:00
parent 32e003c875
commit 0e98a190bb

View file

@ -132,5 +132,8 @@ void nse::util::GLDebug::SetupDebugCallback()
{ {
glEnable(GL_DEBUG_OUTPUT); glEnable(GL_DEBUG_OUTPUT);
glEnable(GL_DEBUG_OUTPUT_SYNCHRONOUS); glEnable(GL_DEBUG_OUTPUT_SYNCHRONOUS);
if (glDebugMessageCallback == nullptr)
std::cout << "Cannot set up an OpenGL debug callback. Perhaps your OpenGL version is too old." << std::endl;
else
glDebugMessageCallback(DebugCallback, &ignoredIds); glDebugMessageCallback(DebugCallback, &ignoredIds);
} }