diff src/video/SDL_renderer_gl.c @ 2812:dc39c0b02f12

Finally got the right mojo for Apple's YUV texture format.
author Sam Lantinga <slouken@libsdl.org>
date Mon, 01 Dec 2008 00:03:51 +0000
parents 7e257c3a3bf0
children 49243a6e9ff1
line wrap: on
line diff
--- 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;