[vlc-commits] opengl: disable shaders on older iOS releases so we get a picture

Felix Paul Kühne git at videolan.org
Sun Jul 8 14:39:34 CEST 2012


vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Sun Jul  8 14:37:05 2012 +0200| [30b05392bd907de2569da5dbf620016727db1f25] | committer: Felix Paul Kühne

opengl: disable shaders on older iOS releases so we get a picture

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=30b05392bd907de2569da5dbf620016727db1f25
---

 modules/video_output/opengl.c |   13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/modules/video_output/opengl.c b/modules/video_output/opengl.c
index fc9c85f..fa20278 100644
--- a/modules/video_output/opengl.c
+++ b/modules/video_output/opengl.c
@@ -70,6 +70,7 @@
 #   define PFNGLCLIENTACTIVETEXTUREPROC      typeof(glClientActiveTexture)*
 #if USE_OPENGL_ES
 #   define GL_UNPACK_ROW_LENGTH 0
+#   import <CoreFoundation/CoreFoundation.h>
 #endif
 #endif
 
@@ -239,9 +240,17 @@ vout_display_opengl_t *vout_display_opengl_New(video_format_t *fmt,
         return NULL;
     }
 
-
+#ifndef USE_OPENGL_ES
     const unsigned char *ogl_version = glGetString(GL_VERSION);
     bool supports_shaders = strverscmp((const char *)ogl_version, "2.0") >= 0;
+#else
+    bool supports_shaders = false;
+#ifdef __APPLE__
+    if( kCFCoreFoundationVersionNumber >= 786. )
+         supports_shaders = true;
+#endif
+#endif
+
     GLint max_texture_units = 0;
     glGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS, &max_texture_units);
 
@@ -498,7 +507,7 @@ vout_display_opengl_t *vout_display_opengl_New(video_format_t *fmt,
 
                     if( link_status == GL_FALSE )
                     {
-                        fprintf( stderr, "Unable to use program %d", i );
+                        fprintf( stderr, "Unable to use program %d\n", i );
                         free( vgl );
                         return NULL;
                     }



More information about the vlc-commits mailing list