mirror of
https://github.com/hyprwm/Hyprland
synced 2024-12-23 07:09:48 +01:00
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:
parent
a357fa3e0a
commit
12ce06f39b
1 changed files with 12 additions and 4 deletions
|
@ -13,7 +13,11 @@ inline const std::vector<SPixelFormat> GLES3_FORMATS = {
|
||||||
{
|
{
|
||||||
.drmFormat = DRM_FORMAT_ARGB8888,
|
.drmFormat = DRM_FORMAT_ARGB8888,
|
||||||
.flipRB = true,
|
.flipRB = true,
|
||||||
|
#ifndef GLES2
|
||||||
.glFormat = GL_RGBA,
|
.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,
|
||||||
|
#ifndef GLES2
|
||||||
.glFormat = GL_RGBA,
|
.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,
|
||||||
|
|
Loading…
Reference in a new issue