Mercurial > sdl-ios-xcode
diff src/video/SDL_renderer_gl.c @ 2778:38dfc890ee6b
Preliminary support for YUV textures
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sat, 22 Nov 2008 06:59:22 +0000 |
parents | 91e601d9df8b |
children | 7af8c4ad427e |
line wrap: on
line diff
--- a/src/video/SDL_renderer_gl.c Mon Nov 17 18:50:50 2008 +0000 +++ b/src/video/SDL_renderer_gl.c Sat Nov 22 06:59:22 2008 +0000 @@ -34,6 +34,7 @@ #include <OpenGL/OpenGL.h> #endif + /* OpenGL renderer implementation */ /* Details on optimizing the texture path on Mac OS X: @@ -112,7 +113,8 @@ SDL_PIXELFORMAT_BGR888, SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_ABGR8888, - SDL_PIXELFORMAT_ARGB2101010}, + SDL_PIXELFORMAT_ARGB2101010, + SDL_PIXELFORMAT_UYVY}, 0, 0} }; @@ -502,6 +504,20 @@ format = GL_BGRA; type = GL_UNSIGNED_INT_2_10_10_10_REV; break; + case SDL_PIXELFORMAT_UYVY: +// if (renderdata->GL_MESA_ycbcr_texture) { +// internalFormat = 3; +// format = GL_YCBCR_MESA; +// type = GL_UNSIGNED_SHORT_8_8_MESA; +// } else if (renderdata->GL_APPLE_ycbcr_422) { + internalFormat = GL_RGB8; + format = GL_YCBCR_422_APPLE; + type = GL_UNSIGNED_SHORT_8_8_APPLE; +// } else { +// SDL_SetError("Unsupported texture format"); +// return -1; +// } + break; default: SDL_SetError("Unsupported texture format"); return -1;