comparison src/video/SDL_renderer_gl.c @ 2813:49243a6e9ff1

Removed the hacky stuff for YUV OpenGL textures, since Ryan's pixel shader code will be far superior. :)
author Sam Lantinga <slouken@libsdl.org>
date Mon, 01 Dec 2008 00:05:31 +0000
parents dc39c0b02f12
children 0379769e8caa
comparison
equal deleted inserted replaced
2812:dc39c0b02f12 2813:49243a6e9ff1
94 (SDL_TEXTUREBLENDMODE_NONE | SDL_TEXTUREBLENDMODE_MASK | 94 (SDL_TEXTUREBLENDMODE_NONE | SDL_TEXTUREBLENDMODE_MASK |
95 SDL_TEXTUREBLENDMODE_BLEND | SDL_TEXTUREBLENDMODE_ADD | 95 SDL_TEXTUREBLENDMODE_BLEND | SDL_TEXTUREBLENDMODE_ADD |
96 SDL_TEXTUREBLENDMODE_MOD), 96 SDL_TEXTUREBLENDMODE_MOD),
97 (SDL_TEXTURESCALEMODE_NONE | SDL_TEXTURESCALEMODE_FAST | 97 (SDL_TEXTURESCALEMODE_NONE | SDL_TEXTURESCALEMODE_FAST |
98 SDL_TEXTURESCALEMODE_SLOW), 98 SDL_TEXTURESCALEMODE_SLOW),
99 16, 99 15,
100 { 100 {
101 SDL_PIXELFORMAT_INDEX1LSB, 101 SDL_PIXELFORMAT_INDEX1LSB,
102 SDL_PIXELFORMAT_INDEX1MSB, 102 SDL_PIXELFORMAT_INDEX1MSB,
103 SDL_PIXELFORMAT_INDEX8, 103 SDL_PIXELFORMAT_INDEX8,
104 SDL_PIXELFORMAT_RGB332, 104 SDL_PIXELFORMAT_RGB332,
111 SDL_PIXELFORMAT_BGR24, 111 SDL_PIXELFORMAT_BGR24,
112 SDL_PIXELFORMAT_RGB888, 112 SDL_PIXELFORMAT_RGB888,
113 SDL_PIXELFORMAT_BGR888, 113 SDL_PIXELFORMAT_BGR888,
114 SDL_PIXELFORMAT_ARGB8888, 114 SDL_PIXELFORMAT_ARGB8888,
115 SDL_PIXELFORMAT_ABGR8888, 115 SDL_PIXELFORMAT_ABGR8888,
116 SDL_PIXELFORMAT_ARGB2101010, 116 SDL_PIXELFORMAT_ARGB2101010},
117 SDL_PIXELFORMAT_UYVY},
118 0, 117 0,
119 0} 118 0}
120 }; 119 };
121 120
122 typedef struct 121 typedef struct
501 break; 500 break;
502 case SDL_PIXELFORMAT_ARGB2101010: 501 case SDL_PIXELFORMAT_ARGB2101010:
503 internalFormat = GL_RGB10_A2; 502 internalFormat = GL_RGB10_A2;
504 format = GL_BGRA; 503 format = GL_BGRA;
505 type = GL_UNSIGNED_INT_2_10_10_10_REV; 504 type = GL_UNSIGNED_INT_2_10_10_10_REV;
506 break;
507 case SDL_PIXELFORMAT_UYVY:
508 // if (renderdata->GL_MESA_ycbcr_texture) {
509 // internalFormat = 3;
510 // format = GL_YCBCR_MESA;
511 // type = GL_UNSIGNED_SHORT_8_8_MESA;
512 // } else if (renderdata->GL_APPLE_ycbcr_422) {
513 internalFormat = GL_RGB;
514 format = GL_YCBCR_422_APPLE;
515 #if SDL_BYTEORDER == SDL_LIL_ENDIAN
516 type = GL_UNSIGNED_SHORT_8_8_APPLE;
517 #else
518 type = GL_UNSIGNED_SHORT_8_8_REV_APPLE;
519 #endif
520 // } else {
521 // SDL_SetError("Unsupported texture format");
522 // return -1;
523 // }
524 break; 505 break;
525 default: 506 default:
526 SDL_SetError("Unsupported texture format"); 507 SDL_SetError("Unsupported texture format");
527 return -1; 508 return -1;
528 } 509 }