# HG changeset patch # User Sam Lantinga # Date 1294874599 28800 # Node ID 047a580d30f3f2eb5184ee6fe1f8c04c600761a7 # Parent 889e6fef8fc5de287c83ee47d27252c7e7304049 Fixed blue-red channel swap in OpenGL ES 16-bit texture formats diff -r 889e6fef8fc5 -r 047a580d30f3 src/video/SDL_renderer_gles.c --- a/src/video/SDL_renderer_gles.c Wed Jan 12 15:22:29 2011 -0800 +++ b/src/video/SDL_renderer_gles.c Wed Jan 12 15:23:19 2011 -0800 @@ -115,9 +115,9 @@ (SDL_SCALEMODE_NONE | SDL_SCALEMODE_FAST | SDL_SCALEMODE_SLOW), 5, { /* OpenGL ES 1.x supported formats list */ - SDL_PIXELFORMAT_ABGR4444, - SDL_PIXELFORMAT_ABGR1555, - SDL_PIXELFORMAT_BGR565, + SDL_PIXELFORMAT_RGBA4444, + SDL_PIXELFORMAT_RGBA5551, + SDL_PIXELFORMAT_RGB565, SDL_PIXELFORMAT_RGB24, SDL_PIXELFORMAT_BGR888, SDL_PIXELFORMAT_ABGR8888}, @@ -392,17 +392,17 @@ format = GL_RGBA; type = GL_UNSIGNED_BYTE; break; - case SDL_PIXELFORMAT_BGR565: + case SDL_PIXELFORMAT_RGB565: internalFormat = GL_RGB; format = GL_RGB; type = GL_UNSIGNED_SHORT_5_6_5; break; - case SDL_PIXELFORMAT_ABGR1555: + case SDL_PIXELFORMAT_RGBA5551: internalFormat = GL_RGBA; format = GL_RGBA; type = GL_UNSIGNED_SHORT_5_5_5_1; break; - case SDL_PIXELFORMAT_ABGR4444: + case SDL_PIXELFORMAT_RGBA4444: internalFormat = GL_RGBA; format = GL_RGBA; type = GL_UNSIGNED_SHORT_4_4_4_4;