Skip to content

SDL2 - UpdateYUVTexture on opengles2 flips red/blue channels #13109

Closed
@itsmattkc

Description

@itsmattkc

My app uses SDL_UpdateYUVTexture extensively for uploading video frames to an SDL_Texture. With the opengl backend, everything displays fine and as expected. However, with the opengles2 backend, the red and blue channels are inexplicably flipped.

✅ Correct result using opengl
Image

❌ Incorrect result using opengles2:
Image

This is particularly problematic on Android (and other embedded/low power systems) where opengles2 is the default/only option.

I'm using SDL 2.32.0 self-compiled as part of my CMake build system. The issue is tracked on our end at vanilla-wiiu/vanilla#133.

I tried investigating but my only guess was some kind of conflict between RGBA and BGRA textures. I couldn't find anything that seemed to definitively solve it. Any help with this issue would be great.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions