comparison src/video/SDL_renderer_gl.c @ 3494:61d95a87c327

Adam Strzelecki to SDL Currently SDL uses GL_RGB for internalFormat when GL_YCBCR_MESA is passed as format for glTextImage2D when using Linux Mesa's OpenGL. However this is wrong and makes glTextImage2D fail with invalid argument error. GL_YCBCR_MESA should be also internalFormat (not GL_RGB) there and this is what can be found googling various source codes using GL_YCBCR_MESA.
author Sam Lantinga <slouken@libsdl.org>
date Thu, 26 Nov 2009 05:55:57 +0000
parents 6f887204fa7a
children 83518f8fcd61
comparison
equal deleted inserted replaced
3493:40b1f7cb2062 3494:61d95a87c327
705 *type = GL_UNSIGNED_SHORT_8_8_APPLE; 705 *type = GL_UNSIGNED_SHORT_8_8_APPLE;
706 #else 706 #else
707 *type = GL_UNSIGNED_SHORT_8_8_REV_APPLE; 707 *type = GL_UNSIGNED_SHORT_8_8_REV_APPLE;
708 #endif 708 #endif
709 } else if (renderdata->GL_MESA_ycbcr_texture_supported) { 709 } else if (renderdata->GL_MESA_ycbcr_texture_supported) {
710 *internalFormat = GL_RGB; 710 *internalFormat = GL_YCBCR_MESA;
711 *format = GL_YCBCR_MESA; 711 *format = GL_YCBCR_MESA;
712 #if SDL_BYTEORDER == SDL_LIL_ENDIAN 712 #if SDL_BYTEORDER == SDL_LIL_ENDIAN
713 *type = GL_UNSIGNED_SHORT_8_8_MESA; 713 *type = GL_UNSIGNED_SHORT_8_8_MESA;
714 #else 714 #else
715 *type = GL_UNSIGNED_SHORT_8_8_REV_MESA; 715 *type = GL_UNSIGNED_SHORT_8_8_REV_MESA;
730 *type = GL_UNSIGNED_SHORT_8_8_REV_APPLE; 730 *type = GL_UNSIGNED_SHORT_8_8_REV_APPLE;
731 #else 731 #else
732 *type = GL_UNSIGNED_SHORT_8_8_APPLE; 732 *type = GL_UNSIGNED_SHORT_8_8_APPLE;
733 #endif 733 #endif
734 } else if (renderdata->GL_MESA_ycbcr_texture_supported) { 734 } else if (renderdata->GL_MESA_ycbcr_texture_supported) {
735 *internalFormat = GL_RGB; 735 *internalFormat = GL_YCBCR_MESA;
736 *format = GL_YCBCR_MESA; 736 *format = GL_YCBCR_MESA;
737 #if SDL_BYTEORDER == SDL_LIL_ENDIAN 737 #if SDL_BYTEORDER == SDL_LIL_ENDIAN
738 *type = GL_UNSIGNED_SHORT_8_8_REV_MESA; 738 *type = GL_UNSIGNED_SHORT_8_8_REV_MESA;
739 #else 739 #else
740 *type = GL_UNSIGNED_SHORT_8_8_MESA; 740 *type = GL_UNSIGNED_SHORT_8_8_MESA;