# HG changeset patch # User reimar # Date 1337530196 0 # Node ID a31ac47eba3945e143f4a79ff4afd12a7bfc5290 # Parent 4e749c1bbf49d16bc3a0fbb39d03ec31dd576a5c Change some texture formats to synonyms that Mesa GLES accepts. diff -r 4e749c1bbf49 -r a31ac47eba39 libvo/gl_common.c --- 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;