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
This commit is contained in:
Vaxry 2024-06-14 19:10:12 +02:00
parent a357fa3e0a
commit 12ce06f39b

View file

@ -11,9 +11,13 @@
*/ */
inline const std::vector<SPixelFormat> GLES3_FORMATS = { inline const std::vector<SPixelFormat> GLES3_FORMATS = {
{ {
.drmFormat = DRM_FORMAT_ARGB8888, .drmFormat = DRM_FORMAT_ARGB8888,
.flipRB = true, .flipRB = true,
.glFormat = GL_RGBA, #ifndef GLES2
.glFormat = GL_RGBA,
#else
.glFormat = GL_BGRA_EXT,
#endif
.glType = GL_UNSIGNED_BYTE, .glType = GL_UNSIGNED_BYTE,
.withAlpha = true, .withAlpha = true,
.alphaStripped = DRM_FORMAT_XRGB8888, .alphaStripped = DRM_FORMAT_XRGB8888,
@ -22,7 +26,11 @@ inline const std::vector<SPixelFormat> GLES3_FORMATS = {
{ {
.drmFormat = DRM_FORMAT_XRGB8888, .drmFormat = DRM_FORMAT_XRGB8888,
.flipRB = true, .flipRB = true,
.glFormat = GL_RGBA, #ifndef GLES2
.glFormat = GL_RGBA,
#else
.glFormat = GL_BGRA_EXT,
#endif
.glType = GL_UNSIGNED_BYTE, .glType = GL_UNSIGNED_BYTE,
.withAlpha = false, .withAlpha = false,
.alphaStripped = DRM_FORMAT_XRGB8888, .alphaStripped = DRM_FORMAT_XRGB8888,