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

@ -13,7 +13,11 @@ inline const std::vector<SPixelFormat> GLES3_FORMATS = {
{
.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,
#ifndef GLES2
.glFormat = GL_RGBA,
#else
.glFormat = GL_BGRA_EXT,
#endif
.glType = GL_UNSIGNED_BYTE,
.withAlpha = false,
.alphaStripped = DRM_FORMAT_XRGB8888,