diff options
| author | Vaxry <vaxry@vaxry.net> | 2024-06-14 19:10:12 +0200 |
|---|---|---|
| committer | Vaxry <vaxry@vaxry.net> | 2024-06-14 19:10:12 +0200 |
| commit | 12ce06f39b2194685ddeadf656ebf2d334836992 (patch) | |
| tree | e8123cb654a15374fc759b7f2baa69cf8a28a80f /src/helpers/Format.cpp | |
| parent | a357fa3e0a60b4f96a1924e0d9753d23001ab00e (diff) | |
format: fix flipped r/b channels on legacy_renderer
We don't wanna use an extension, but for gles2 there is no other option.
fixes #6465
Diffstat (limited to 'src/helpers/Format.cpp')
| -rw-r--r-- | src/helpers/Format.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/helpers/Format.cpp b/src/helpers/Format.cpp index 9c94f68b..65828519 100644 --- a/src/helpers/Format.cpp +++ b/src/helpers/Format.cpp @@ -11,9 +11,13 @@ */ inline const std::vector<SPixelFormat> GLES3_FORMATS = { { - .drmFormat = DRM_FORMAT_ARGB8888, - .flipRB = true, - .glFormat = GL_RGBA, + .drmFormat = DRM_FORMAT_ARGB8888, + .flipRB = true, +#ifndef GLES2 + .glFormat = GL_RGBA, +#else + .glFormat = GL_BGRA_EXT, +#endif .glType = GL_UNSIGNED_BYTE, .withAlpha = true, .alphaStripped = DRM_FORMAT_XRGB8888, @@ -22,7 +26,11 @@ inline const std::vector<SPixelFormat> GLES3_FORMATS = { { .drmFormat = DRM_FORMAT_XRGB8888, .flipRB = true, - .glFormat = GL_RGBA, +#ifndef GLES2 + .glFormat = GL_RGBA, +#else + .glFormat = GL_BGRA_EXT, +#endif .glType = GL_UNSIGNED_BYTE, .withAlpha = false, .alphaStripped = DRM_FORMAT_XRGB8888, |
