1
0
Fork 0

cogl/gl: Use internal formats without alpha for non-alpha Cogl formats

The formats COGL_PIXEL_FORMAT_RGB_888 and COGL_PIXEL_FORMAT_BGR_888 for
the gl driver were using internal formats with an alpha channel.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3914>

(cherry picked from commit 41700d3cc7)
This commit is contained in:
Sebastian Wick 2024-07-31 17:47:04 +02:00 committed by Robert Mader
parent 6e12b423c7
commit eecec5a699

View file

@ -124,12 +124,12 @@ _cogl_driver_pixel_format_to_gl (CoglContext *context,
break;
case COGL_PIXEL_FORMAT_RGB_888:
glintformat = GL_RGBA8;
glintformat = GL_RGB8;
glformat = GL_RGB;
gltype = GL_UNSIGNED_BYTE;
break;
case COGL_PIXEL_FORMAT_BGR_888:
glintformat = GL_RGBA8;
glintformat = GL_RGB8;
glformat = GL_BGR;
gltype = GL_UNSIGNED_BYTE;
break;