# HG changeset patch # User Sam Lantinga # Date 1228089831 0 # Node ID dc39c0b02f12ce9133af07aaa06e576a57e5eee0 # Parent 7af2419ad5b03576d66631c887c9dbec4dfe6025 Finally got the right mojo for Apple's YUV texture format. diff -r 7af2419ad5b0 -r dc39c0b02f12 src/video/SDL_renderer_gl.c --- a/src/video/SDL_renderer_gl.c Sun Nov 30 23:42:33 2008 +0000 +++ b/src/video/SDL_renderer_gl.c Mon Dec 01 00:03:51 2008 +0000 @@ -510,9 +510,13 @@ // format = GL_YCBCR_MESA; // type = GL_UNSIGNED_SHORT_8_8_MESA; // } else if (renderdata->GL_APPLE_ycbcr_422) { - internalFormat = GL_RGB8; + internalFormat = GL_RGB; format = GL_YCBCR_422_APPLE; +#if SDL_BYTEORDER == SDL_LIL_ENDIAN type = GL_UNSIGNED_SHORT_8_8_APPLE; +#else + type = GL_UNSIGNED_SHORT_8_8_REV_APPLE; +#endif // } else { // SDL_SetError("Unsupported texture format"); // return -1;