comparison src/video/SDL_renderer_gles.c @ 4985:047a580d30f3

Fixed blue-red channel swap in OpenGL ES 16-bit texture formats
author Sam Lantinga <slouken@libsdl.org>
date Wed, 12 Jan 2011 15:23:19 -0800
parents 604077962776
children 8431f59485d0
comparison
equal deleted inserted replaced
4984:889e6fef8fc5 4985:047a580d30f3
113 (SDL_BLENDMODE_NONE | SDL_BLENDMODE_MASK | 113 (SDL_BLENDMODE_NONE | SDL_BLENDMODE_MASK |
114 SDL_BLENDMODE_BLEND | SDL_BLENDMODE_ADD | SDL_BLENDMODE_MOD), 114 SDL_BLENDMODE_BLEND | SDL_BLENDMODE_ADD | SDL_BLENDMODE_MOD),
115 (SDL_SCALEMODE_NONE | SDL_SCALEMODE_FAST | SDL_SCALEMODE_SLOW), 5, 115 (SDL_SCALEMODE_NONE | SDL_SCALEMODE_FAST | SDL_SCALEMODE_SLOW), 5,
116 { 116 {
117 /* OpenGL ES 1.x supported formats list */ 117 /* OpenGL ES 1.x supported formats list */
118 SDL_PIXELFORMAT_ABGR4444, 118 SDL_PIXELFORMAT_RGBA4444,
119 SDL_PIXELFORMAT_ABGR1555, 119 SDL_PIXELFORMAT_RGBA5551,
120 SDL_PIXELFORMAT_BGR565, 120 SDL_PIXELFORMAT_RGB565,
121 SDL_PIXELFORMAT_RGB24, 121 SDL_PIXELFORMAT_RGB24,
122 SDL_PIXELFORMAT_BGR888, 122 SDL_PIXELFORMAT_BGR888,
123 SDL_PIXELFORMAT_ABGR8888}, 123 SDL_PIXELFORMAT_ABGR8888},
124 0, 124 0,
125 0} 125 0}
390 case SDL_PIXELFORMAT_ABGR8888: 390 case SDL_PIXELFORMAT_ABGR8888:
391 internalFormat = GL_RGBA; 391 internalFormat = GL_RGBA;
392 format = GL_RGBA; 392 format = GL_RGBA;
393 type = GL_UNSIGNED_BYTE; 393 type = GL_UNSIGNED_BYTE;
394 break; 394 break;
395 case SDL_PIXELFORMAT_BGR565: 395 case SDL_PIXELFORMAT_RGB565:
396 internalFormat = GL_RGB; 396 internalFormat = GL_RGB;
397 format = GL_RGB; 397 format = GL_RGB;
398 type = GL_UNSIGNED_SHORT_5_6_5; 398 type = GL_UNSIGNED_SHORT_5_6_5;
399 break; 399 break;
400 case SDL_PIXELFORMAT_ABGR1555: 400 case SDL_PIXELFORMAT_RGBA5551:
401 internalFormat = GL_RGBA; 401 internalFormat = GL_RGBA;
402 format = GL_RGBA; 402 format = GL_RGBA;
403 type = GL_UNSIGNED_SHORT_5_5_5_1; 403 type = GL_UNSIGNED_SHORT_5_5_5_1;
404 break; 404 break;
405 case SDL_PIXELFORMAT_ABGR4444: 405 case SDL_PIXELFORMAT_RGBA4444:
406 internalFormat = GL_RGBA; 406 internalFormat = GL_RGBA;
407 format = GL_RGBA; 407 format = GL_RGBA;
408 type = GL_UNSIGNED_SHORT_4_4_4_4; 408 type = GL_UNSIGNED_SHORT_4_4_4_4;
409 break; 409 break;
410 default: 410 default: