Skip to content

Instantly share code, notes, and snippets.

@AbigailBuccaneer
Created July 9, 2015 13:49
Show Gist options
  • Save AbigailBuccaneer/af471eba6f7221de826e to your computer and use it in GitHub Desktop.
Save AbigailBuccaneer/af471eba6f7221de826e to your computer and use it in GitHub Desktop.
static void GLMessageCallback(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar* message, const void*)
{
std::cout << message << std::endl;
}
static void SetupMessageCallback {
if (!ogl_ext_KHR_debug) return;
glDebugMessageCallback(GLMessageCallback, nullptr);
glEnable(GL_DEBUG_OUTPUT_SYNCHRONOUS);
glDebugMessageControl(GL_DONT_CARE, GL_DONT_CARE, GL_DONT_CARE, 0, nullptr, GL_TRUE);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment