changeset 36178:927dedf22dde

Support 16-bit YUV on OpenGL ES.
author reimar
date Thu, 16 May 2013 19:20:31 +0000
parents 00a9c3937ea1
children 512629a9aa21
files libvo/gl_common.c
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/gl_common.c	Thu May 16 18:22:53 2013 +0000
+++ b/libvo/gl_common.c	Thu May 16 19:20:31 2013 +0000
@@ -595,7 +595,8 @@
   else
     hqtexfmt = GL_RGB16;
   use_depth_l16 = !!strstr(allexts, "GL_EXT_shadow") ||
-                  !!strstr(allexts, "GL_ARB_shadow");
+                  !!strstr(allexts, "GL_ARB_shadow") ||
+                  !!strstr(allexts, "GL_OES_depth_texture");
   free(allexts);
 }
 
@@ -635,8 +636,8 @@
     // ensure we get enough bits
     GLint bits = 0;
     mpglGetTexLevelParameteriv(target, 0, GL_TEXTURE_LUMINANCE_SIZE, &bits);
-    if (bits > 0 && bits < 14 && (use_depth_l16 || HAVE_BIGENDIAN)) {
-      fmt = GL_DEPTH_COMPONENT16;
+    if (bits >= 0 && bits < 14 && (use_depth_l16 || HAVE_BIGENDIAN)) {
+      fmt = GL_DEPTH_COMPONENT;
       format = GL_DEPTH_COMPONENT;
       if (!use_depth_l16) {
         // if we cannot get 16 bit anyway, we can fall back