diff options
author | wm4 <wm4@nowhere> | 2015-08-01 21:11:38 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-08-01 21:11:38 +0200 |
commit | 5b14ceb3156ce643673e01d7b9e257700470f56d (patch) | |
tree | cb2f6a6596bf9cdc518517ea710d9d51a5b9847c /video/out | |
parent | 41101c2996262c47757bc3bbf39cc11bd7dc5f99 (diff) | |
download | mpv-5b14ceb3156ce643673e01d7b9e257700470f56d.tar.bz2 mpv-5b14ceb3156ce643673e01d7b9e257700470f56d.tar.xz |
vo_opengl: minor simplifications
No functional changes.
Diffstat (limited to 'video/out')
-rw-r--r-- | video/out/gl_common.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/video/out/gl_common.c b/video/out/gl_common.c index 517281f578..c9b3b77735 100644 --- a/video/out/gl_common.c +++ b/video/out/gl_common.c @@ -377,7 +377,7 @@ void mpgl_load_functions2(GL *gl, void *(*get_fn)(void *ctx, const char *n), mp_dbg(log, "Combined OpenGL extensions string:\n%s\n", gl->extensions); - for (int n = 0; n < sizeof(gl_functions) / sizeof(gl_functions[0]); n++) { + for (int n = 0; n < MP_ARRAY_SIZE(gl_functions); n++) { const struct gl_functions *section = &gl_functions[n]; int version = gl->es ? gl->es : gl->version; int ver_core = gl->es ? section->ver_es_core : section->ver_core; @@ -414,10 +414,8 @@ void mpgl_load_functions2(GL *gl, void *(*get_fn)(void *ctx, const char *n), section->extension ? section->extension : "builtin", MPGL_VER_GET_MAJOR(ver_core), MPGL_VER_GET_MINOR(ver_core)); - if (must_exist) { - gl->mpgl_caps = 0; + if (must_exist) goto error; - } break; } assert(i < MAX_FN_COUNT); |