Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Adam Strzelecki to SDL
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
slouken committed Nov 26, 2009
1 parent fc18228 commit 4369a54
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/video/SDL_renderer_gl.c
Expand Up @@ -707,7 +707,7 @@ convert_format(GL_RenderData *renderdata, Uint32 pixel_format,
*type = GL_UNSIGNED_SHORT_8_8_REV_APPLE;
#endif
} else if (renderdata->GL_MESA_ycbcr_texture_supported) {
*internalFormat = GL_RGB;
*internalFormat = GL_YCBCR_MESA;
*format = GL_YCBCR_MESA;
#if SDL_BYTEORDER == SDL_LIL_ENDIAN
*type = GL_UNSIGNED_SHORT_8_8_MESA;
Expand All @@ -732,7 +732,7 @@ convert_format(GL_RenderData *renderdata, Uint32 pixel_format,
*type = GL_UNSIGNED_SHORT_8_8_APPLE;
#endif
} else if (renderdata->GL_MESA_ycbcr_texture_supported) {
*internalFormat = GL_RGB;
*internalFormat = GL_YCBCR_MESA;
*format = GL_YCBCR_MESA;
#if SDL_BYTEORDER == SDL_LIL_ENDIAN
*type = GL_UNSIGNED_SHORT_8_8_REV_MESA;
Expand Down

0 comments on commit 4369a54

Please sign in to comment.