diff options
author | wm4 <wm4@nowhere> | 2014-12-19 00:58:56 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-12-19 01:21:18 +0100 |
commit | fe35130ba9079c09c74a5f5334584f1ccca15e52 (patch) | |
tree | 8e03910ea175b91aa46d12e97ef211b684f1b62a /video/out/gl_common.h | |
parent | de3e26bc846eee938248c9be3a688091f0eab49c (diff) | |
download | mpv-fe35130ba9079c09c74a5f5334584f1ccca15e52.tar.bz2 mpv-fe35130ba9079c09c74a5f5334584f1ccca15e52.tar.xz |
vo_opengl: mess with PixelStorei state management
This is needed for GLES 2 support. GLES 2 doesn't support
GL_UNPACK_ROW_LENGTH, and we shouldn't even use this constant, since a
GLES implementation could raise an error.
So set it only if neccessary, and leave it in the default state
otherwise. This also smuggles in a ES 2 fallback for glUploadTex(),
and querying an extension relevant for ES 2. For the alignment state
(GL_[UN]PACK_ALIGNMENT) do the same for symmetry. All 4 states
(alignment/rows x pack/unpack) are now assumed to be in their initial
states by default.
Also redo the PixelStorei handling in the function table. I could rebase
this, but look at the commit time.
Diffstat (limited to 'video/out/gl_common.h')
-rw-r--r-- | video/out/gl_common.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/video/out/gl_common.h b/video/out/gl_common.h index 41335e2706..3f0f999eaa 100644 --- a/video/out/gl_common.h +++ b/video/out/gl_common.h @@ -70,6 +70,7 @@ mp_image_t *glGetWindowScreenshot(GL *gl); enum { MPGL_CAP_GL_LEGACY = (1 << 1), // GL 1.1 (excluding 3.x) MPGL_CAP_GL21 = (1 << 3), // GL 2.1+ (excluding legacy) + MPGL_CAP_ROW_LENGTH = (1 << 4), // GL_[UN]PACK_ROW_LENGTH MPGL_CAP_FB = (1 << 5), MPGL_CAP_VAO = (1 << 6), MPGL_CAP_SRGB_TEX = (1 << 7), |