summaryrefslogtreecommitdiffstats
path: root/video/out/gl_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'video/out/gl_common.c')
-rw-r--r--video/out/gl_common.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/video/out/gl_common.c b/video/out/gl_common.c
index a94ad1fc75..cfae5cc39f 100644
--- a/video/out/gl_common.c
+++ b/video/out/gl_common.c
@@ -107,6 +107,7 @@ static const struct feature features[] = {
{MPGL_CAP_TEX_RG, "RG textures"},
{MPGL_CAP_1ST_CLASS_ARRAYS, "1st class shader arrays"},
{MPGL_CAP_3D_TEX, "3D textures"},
+ {MPGL_CAP_DEBUG, "debugging extensions"},
{MPGL_CAP_SW, "suspected software renderer"},
{0},
};
@@ -462,6 +463,16 @@ static const struct gl_functions gl_functions[] = {
.extension = "GL_APPLE_rgb_422",
.provides = MPGL_CAP_APPLE_RGB_422,
},
+ {
+ .ver_core = 430,
+ .extension = "GL_ARB_debug_output",
+ .provides = MPGL_CAP_DEBUG,
+ .functions = (const struct gl_function[]) {
+ // (only functions needed by us)
+ DEF_FN(DebugMessageCallback),
+ {0}
+ },
+ },
};
#undef FN_OFFS
@@ -972,6 +983,8 @@ MPGLContext *mpgl_init(struct vo *vo, const char *backend_name,
goto cleanup;
}
+ ctx->gl->debug_context = !!(vo_flags & VOFLAG_GL_DEBUG);
+
return ctx;
cleanup: