Preliminary support for YUV textures
--HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403239
This commit is contained in:
parent
6968453f53
commit
35c71403d7
1 changed files with 17 additions and 1 deletions
|
@ -34,6 +34,7 @@
|
||||||
#include <OpenGL/OpenGL.h>
|
#include <OpenGL/OpenGL.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* OpenGL renderer implementation */
|
/* OpenGL renderer implementation */
|
||||||
|
|
||||||
/* Details on optimizing the texture path on Mac OS X:
|
/* Details on optimizing the texture path on Mac OS X:
|
||||||
|
@ -112,7 +113,8 @@ SDL_RenderDriver GL_RenderDriver = {
|
||||||
SDL_PIXELFORMAT_BGR888,
|
SDL_PIXELFORMAT_BGR888,
|
||||||
SDL_PIXELFORMAT_ARGB8888,
|
SDL_PIXELFORMAT_ARGB8888,
|
||||||
SDL_PIXELFORMAT_ABGR8888,
|
SDL_PIXELFORMAT_ABGR8888,
|
||||||
SDL_PIXELFORMAT_ARGB2101010},
|
SDL_PIXELFORMAT_ARGB2101010,
|
||||||
|
SDL_PIXELFORMAT_UYVY},
|
||||||
0,
|
0,
|
||||||
0}
|
0}
|
||||||
};
|
};
|
||||||
|
@ -502,6 +504,20 @@ GL_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture)
|
||||||
format = GL_BGRA;
|
format = GL_BGRA;
|
||||||
type = GL_UNSIGNED_INT_2_10_10_10_REV;
|
type = GL_UNSIGNED_INT_2_10_10_10_REV;
|
||||||
break;
|
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:
|
default:
|
||||||
SDL_SetError("Unsupported texture format");
|
SDL_SetError("Unsupported texture format");
|
||||||
return -1;
|
return -1;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue