changeset 34842:a31ac47eba39

Change some texture formats to synonyms that Mesa GLES accepts.
author reimar
date Sun, 20 May 2012 16:09:56 +0000
parents 4e749c1bbf49
children ec5d1147164e
files libvo/gl_common.c
diffstat 1 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/gl_common.c	Sun May 20 15:41:41 2012 +0000
+++ b/libvo/gl_common.c	Sun May 20 16:09:56 2012 +0000
@@ -271,10 +271,10 @@
   }
 
   *bpp = IMGFMT_IS_BGR(fmt)?IMGFMT_BGR_DEPTH(fmt):IMGFMT_RGB_DEPTH(fmt);
-  *gl_texfmt = 3;
+  *gl_texfmt = GL_RGB;
   switch (fmt) {
     case IMGFMT_RGB64NE:
-      *gl_texfmt = 4;
+      *gl_texfmt = GL_RGBA16;
     case IMGFMT_RGB48NE:
       *gl_format = GL_RGB;
       *gl_type = GL_UNSIGNED_SHORT;
@@ -284,7 +284,7 @@
       *gl_type = GL_UNSIGNED_BYTE;
       break;
     case IMGFMT_RGBA:
-      *gl_texfmt = 4;
+      *gl_texfmt = GL_RGBA;
       *gl_format = GL_RGBA;
       *gl_type = GL_UNSIGNED_BYTE;
       break;
@@ -299,7 +299,7 @@
       supported = 0; // no native YV12 support
     case IMGFMT_Y800:
     case IMGFMT_Y8:
-      *gl_texfmt = 1;
+      *gl_texfmt = GL_LUMINANCE;
       *bpp = 8;
       *gl_format = GL_LUMINANCE;
       *gl_type = GL_UNSIGNED_BYTE;
@@ -352,12 +352,12 @@
       *gl_type = GL_UNSIGNED_BYTE;
       break;
     case IMGFMT_BGRA:
-      *gl_texfmt = 4;
+      *gl_texfmt = GL_RGBA;
       *gl_format = GL_BGRA;
       *gl_type = GL_UNSIGNED_BYTE;
       break;
     default:
-      *gl_texfmt = 4;
+      *gl_texfmt = GL_RGBA;
       *gl_format = GL_RGBA;
       *gl_type = GL_UNSIGNED_BYTE;
       supported = 0;