added check for debug callback
This commit is contained in:
parent
32e003c875
commit
0e98a190bb
1 changed files with 4 additions and 1 deletions
|
@ -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);
|
||||||
glDebugMessageCallback(DebugCallback, &ignoredIds);
|
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);
|
||||||
}
|
}
|
Loading…
Reference in a new issue