Skip to content

Commit

Permalink
[client] egl: fix rgb24 regression
Browse files Browse the repository at this point in the history
We need the alpha channel for this data type
  • Loading branch information
gnif committed Nov 21, 2023
1 parent 43a3fb0 commit 22d949c
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions client/renderers/EGL/texture_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,6 @@ bool egl_texUtilGetFormat(const EGL_TexSetup * setup, EGL_TexFormat * fmt)

switch(setup->pixFmt)
{
//EGL has no support for 24-bit formats, so we stuff it into a 32-bit
//texture to unpack with a shader later
case EGL_PF_BGR_32:
// fallthrough

case EGL_PF_BGRA:
fmt->bpp = 4;
fmt->format = GL_BGRA_EXT;
Expand Down Expand Up @@ -75,6 +70,16 @@ bool egl_texUtilGetFormat(const EGL_TexSetup * setup, EGL_TexFormat * fmt)
fmt->fourcc = DRM_FORMAT_XBGR16161616F;
break;

//EGL has no support for 24-bit formats, so we stuff it into a 32-bit
//texture to unpack with a shader later
case EGL_PF_BGR_32:
fmt->bpp = 4;
fmt->format = GL_BGRA_EXT;
fmt->intFormat = GL_BGRA_EXT;
fmt->dataType = GL_UNSIGNED_BYTE;
fmt->fourcc = DRM_FORMAT_ARGB8888;
break;

case EGL_PF_RGB_24:
fmt->bpp = 3;
fmt->format = GL_RGB;
Expand Down

0 comments on commit 22d949c

Please sign in to comment.