Commit 8a9c9fcc authored by Sam Lantinga's avatar Sam Lantinga

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.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404235
parent 88a5324d
...@@ -707,7 +707,7 @@ convert_format(GL_RenderData *renderdata, Uint32 pixel_format, ...@@ -707,7 +707,7 @@ convert_format(GL_RenderData *renderdata, Uint32 pixel_format,
*type = GL_UNSIGNED_SHORT_8_8_REV_APPLE; *type = GL_UNSIGNED_SHORT_8_8_REV_APPLE;
#endif #endif
} else if (renderdata->GL_MESA_ycbcr_texture_supported) { } else if (renderdata->GL_MESA_ycbcr_texture_supported) {
*internalFormat = GL_RGB; *internalFormat = GL_YCBCR_MESA;
*format = GL_YCBCR_MESA; *format = GL_YCBCR_MESA;
#if SDL_BYTEORDER == SDL_LIL_ENDIAN #if SDL_BYTEORDER == SDL_LIL_ENDIAN
*type = GL_UNSIGNED_SHORT_8_8_MESA; *type = GL_UNSIGNED_SHORT_8_8_MESA;
...@@ -732,7 +732,7 @@ convert_format(GL_RenderData *renderdata, Uint32 pixel_format, ...@@ -732,7 +732,7 @@ convert_format(GL_RenderData *renderdata, Uint32 pixel_format,
*type = GL_UNSIGNED_SHORT_8_8_APPLE; *type = GL_UNSIGNED_SHORT_8_8_APPLE;
#endif #endif
} else if (renderdata->GL_MESA_ycbcr_texture_supported) { } else if (renderdata->GL_MESA_ycbcr_texture_supported) {
*internalFormat = GL_RGB; *internalFormat = GL_YCBCR_MESA;
*format = GL_YCBCR_MESA; *format = GL_YCBCR_MESA;
#if SDL_BYTEORDER == SDL_LIL_ENDIAN #if SDL_BYTEORDER == SDL_LIL_ENDIAN
*type = GL_UNSIGNED_SHORT_8_8_REV_MESA; *type = GL_UNSIGNED_SHORT_8_8_REV_MESA;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment