changeset 4985:047a580d30f3

Fixed blue-red channel swap in OpenGL ES 16-bit texture formats
author Sam Lantinga <slouken@libsdl.org>
date Wed, 12 Jan 2011 15:23:19 -0800
parents 889e6fef8fc5
children 8431f59485d0
files src/video/SDL_renderer_gles.c
diffstat 1 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- 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;