[MPlayer-cvslog] r31013 - trunk/libvo/vo_gl2.c

reimar subversion at mplayerhq.hu
Sun Apr 4 21:56:27 CEST 2010


Author: reimar
Date: Sun Apr  4 21:56:26 2010
New Revision: 31013

Log:
Check texture dimensions instead of internal format in max texture
size check to work around OS X ATI driver bugs:
- does not keep format but use an equivalent one (1 becomes 0x8040).
- does not set to 0 on failure but to 0x8018

Modified:
   trunk/libvo/vo_gl2.c

Modified: trunk/libvo/vo_gl2.c
==============================================================================
--- trunk/libvo/vo_gl2.c	Sun Apr  4 21:44:03 2010	(r31012)
+++ trunk/libvo/vo_gl2.c	Sun Apr  4 21:56:26 2010	(r31013)
@@ -172,7 +172,6 @@ static int initTextures(void)
   GLfloat texpercx, texpercy;
   int s;
   int x=0, y=0;
-  GLint format=0;
 
   // textures smaller than 64x64 might not be supported
   s=64;
@@ -190,15 +189,16 @@ static int initTextures(void)
 
   /* Test the max texture size */
   do {
+    GLint w;
     glTexImage2D (GL_PROXY_TEXTURE_2D, 0,
                   gl_internal_format,
                   texture_width, texture_height,
                   0, gl_bitmap_format, gl_bitmap_type, NULL);
 
     glGetTexLevelParameteriv
-      (GL_PROXY_TEXTURE_2D, 0, GL_TEXTURE_INTERNAL_FORMAT, &format);
+      (GL_PROXY_TEXTURE_2D, 0, GL_TEXTURE_WIDTH, &w);
 
-    if (format == gl_internal_format)
+    if (w >= texture_width)
       break;
 
     mp_msg (MSGT_VO, MSGL_V, "[gl2] Needed texture [%dx%d] too big, trying ",


More information about the MPlayer-cvslog mailing list