diff options
author | wm4 <wm4@nowhere> | 2014-12-23 02:46:44 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-12-23 02:46:44 +0100 |
commit | a8ffa0d0ebca8e502c4dafb6ea5011e17c978b1a (patch) | |
tree | 81fcbf0b391ed889fe3a80bed5e4e9ba554defc3 /video/out/gl_common.c | |
parent | b7d0db8bfed7e9dac40f62977b016b3b8e5fdbc7 (diff) | |
download | mpv-a8ffa0d0ebca8e502c4dafb6ea5011e17c978b1a.tar.bz2 mpv-a8ffa0d0ebca8e502c4dafb6ea5011e17c978b1a.tar.xz |
vo_opengl: make use of newer OpenGL logging API
GL_ARB_debug_output provides a logging callback, which can be used to
diagnose problems etc. in case the driver supports it. It's enabled only
if the vo_opengl "debug" suboption is set.
Diffstat (limited to 'video/out/gl_common.c')
-rw-r--r-- | video/out/gl_common.c | 13 |
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: |