Finally got the right mojo for Apple's YUV texture format.
authorSam Lantinga <slouken@libsdl.org>
Mon, 01 Dec 2008 00:03:51 +0000
changeset 2812dc39c0b02f12
parent 2811 7af2419ad5b0
child 2813 49243a6e9ff1
Finally got the right mojo for Apple's YUV texture format.
src/video/SDL_renderer_gl.c
     1.1 --- a/src/video/SDL_renderer_gl.c	Sun Nov 30 23:42:33 2008 +0000
     1.2 +++ b/src/video/SDL_renderer_gl.c	Mon Dec 01 00:03:51 2008 +0000
     1.3 @@ -510,9 +510,13 @@
     1.4  //            format = GL_YCBCR_MESA;
     1.5  //            type = GL_UNSIGNED_SHORT_8_8_MESA;
     1.6  //        } else if (renderdata->GL_APPLE_ycbcr_422) {
     1.7 -            internalFormat = GL_RGB8;
     1.8 +            internalFormat = GL_RGB;
     1.9              format = GL_YCBCR_422_APPLE;
    1.10 +#if SDL_BYTEORDER == SDL_LIL_ENDIAN
    1.11              type = GL_UNSIGNED_SHORT_8_8_APPLE;
    1.12 +#else
    1.13 +            type = GL_UNSIGNED_SHORT_8_8_REV_APPLE;
    1.14 +#endif
    1.15  //        } else {
    1.16  //            SDL_SetError("Unsupported texture format");
    1.17  //            return -1;