Skip to content

Commit

Permalink
Fixed|libgui: Build without ARB_debug_output
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Feb 13, 2014
1 parent 1f57dd9 commit d2c380e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions doomsday/libgui/src/glinfo.cpp
Expand Up @@ -30,11 +30,18 @@ namespace de {

static GLInfo info;

#ifdef GL_ARB_debug_output
static void glDebugOut(GLenum source, GLenum type, GLuint id, GLenum severity,
GLsizei length, GLchar const *message, void const *userParam)
{
DENG2_UNUSED(source);
DENG2_UNUSED(type);
DENG2_UNUSED(id);
DENG2_UNUSED(severity);
DENG2_UNUSED(userParam);
qWarning() << "[GL]" << String(message, length);
}
#endif

DENG2_PIMPL_NOREF(GLInfo)
{
Expand Down Expand Up @@ -161,8 +168,10 @@ DENG2_PIMPL_NOREF(GLInfo)

if(CommandLine_Exists("-gldebug"))
{
#ifdef GL_ARB_debug_output
/// @todo The GL context is not created with the debug output bit. -jk
glDebugMessageCallbackARB(glDebugOut, NULL);
#endif
}

inited = true;
Expand Down

0 comments on commit d2c380e

Please sign in to comment.