src/App.cpp
// returns `true` if current OpenGL context is in debug mode
returns `true` if current OpenGL context is in debug mode
returns ` true ` if current OpenGL context is in debug mode
static bool IsOpenGLInDebugMode()
{
    {
        GLint flags;
        glGetIntegerv(GL_CONTEXT_FLAGS, &flags);
        if (!(flags & GL_CONTEXT_FLAG_DEBUG_BIT))
        {
            return false;
        }
    }
    {
        GLboolean b = false;
        glGetBooleanv(GL_DEBUG_OUTPUT, &b);
        if (!b)
        {
            return false;
        }
    }
    {
        GLboolean b = false;
        glGetBooleanv(GL_DEBUG_OUTPUT_SYNCHRONOUS, &b);
        if (!b)
        {
            return false;
        }
    }
    return true;
}
static bool IsOpenGLInDebugMode ( ) { { GLint flags ; glGetIntegerv ( GL_CONTEXT_FLAGS , & flags ) ; if ( ! ( flags & GL_CONTEXT_FLAG_DEBUG_BIT ) ) { return false ; } } { GLboolean b = false ; glGetBooleanv ( GL_DEBUG_OUTPUT , & b ) ; if ( ! b ) { return false ; } } { GLboolean b = false ; glGetBooleanv ( GL_DEBUG_OUTPUT_SYNCHRONOUS , & b ) ; if ( ! b ) { return false ; } } return true ; }
returns `true` if current OpenGL context is in debug mode
returns ` true ` if current OpenGL context is in debug mode
// if context is not debug-mode, then some of the glGet*s below can fail // (e.g. GL_DEBUG_OUTPUT_SYNCHRONOUS on apple).