Fixed blue-red channel swap in OpenGL ES 16-bit texture formats
authorSam Lantinga
Wed, 12 Jan 2011 15:23:19 -0800
changeset 4985047a580d30f3
parent 4984 889e6fef8fc5
child 4986 8431f59485d0
Fixed blue-red channel swap in OpenGL ES 16-bit texture formats
src/video/SDL_renderer_gles.c
     1.1 --- a/src/video/SDL_renderer_gles.c	Wed Jan 12 15:22:29 2011 -0800
     1.2 +++ b/src/video/SDL_renderer_gles.c	Wed Jan 12 15:23:19 2011 -0800
     1.3 @@ -115,9 +115,9 @@
     1.4       (SDL_SCALEMODE_NONE | SDL_SCALEMODE_FAST | SDL_SCALEMODE_SLOW), 5,
     1.5       {
     1.6        /* OpenGL ES 1.x supported formats list */
     1.7 -      SDL_PIXELFORMAT_ABGR4444,
     1.8 -      SDL_PIXELFORMAT_ABGR1555,
     1.9 -      SDL_PIXELFORMAT_BGR565,
    1.10 +      SDL_PIXELFORMAT_RGBA4444,
    1.11 +      SDL_PIXELFORMAT_RGBA5551,
    1.12 +      SDL_PIXELFORMAT_RGB565,
    1.13        SDL_PIXELFORMAT_RGB24,
    1.14        SDL_PIXELFORMAT_BGR888,
    1.15        SDL_PIXELFORMAT_ABGR8888},
    1.16 @@ -392,17 +392,17 @@
    1.17          format = GL_RGBA;
    1.18          type = GL_UNSIGNED_BYTE;
    1.19          break;
    1.20 -    case SDL_PIXELFORMAT_BGR565:
    1.21 +    case SDL_PIXELFORMAT_RGB565:
    1.22          internalFormat = GL_RGB;
    1.23          format = GL_RGB;
    1.24          type = GL_UNSIGNED_SHORT_5_6_5;
    1.25          break;
    1.26 -    case SDL_PIXELFORMAT_ABGR1555:
    1.27 +    case SDL_PIXELFORMAT_RGBA5551:
    1.28          internalFormat = GL_RGBA;
    1.29          format = GL_RGBA;
    1.30          type = GL_UNSIGNED_SHORT_5_5_5_1;
    1.31          break;
    1.32 -    case SDL_PIXELFORMAT_ABGR4444:
    1.33 +    case SDL_PIXELFORMAT_RGBA4444:
    1.34          internalFormat = GL_RGBA;
    1.35          format = GL_RGBA;
    1.36          type = GL_UNSIGNED_SHORT_4_4_4_4;