diff --git a/client/renderers/EGL/texture_util.c b/client/renderers/EGL/texture_util.c index 3cda65a90..8f9503067 100644 --- a/client/renderers/EGL/texture_util.c +++ b/client/renderers/EGL/texture_util.c @@ -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; @@ -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;