cogl/gles: Use the GL_BGRA8_EXT internalformat instead of the format
There is one define for the format (GL_BGRA_EXT) and one for the
internal format (GL_BGRA8_EXT). Use them appropriately.
This also adds defines to consistenly not use the _EXT postfix.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3914>
(cherry picked from commit c3eb01e547
)
This commit is contained in:
parent
66156236e2
commit
7ab98f961c
1 changed files with 12 additions and 3 deletions
|
@ -89,6 +89,15 @@
|
|||
#ifndef GL_RGBA16
|
||||
#define GL_RGBA16 0x805B
|
||||
#endif
|
||||
#ifndef GL_BGRA
|
||||
#define GL_BGRA 0x80E1
|
||||
#endif
|
||||
#ifndef GL_BGRA8
|
||||
#define GL_BGRA8 0x93A1
|
||||
#endif
|
||||
#ifndef GL_RG8
|
||||
#define GL_RG8 0x822B
|
||||
#endif
|
||||
|
||||
static CoglPixelFormat
|
||||
_cogl_driver_pixel_format_to_gl (CoglContext *context,
|
||||
|
@ -165,7 +174,7 @@ _cogl_driver_pixel_format_to_gl (CoglContext *context,
|
|||
case COGL_PIXEL_FORMAT_RG_88:
|
||||
if (cogl_has_feature (context, COGL_FEATURE_ID_TEXTURE_RG))
|
||||
{
|
||||
glintformat = GL_RG8_EXT;
|
||||
glintformat = GL_RG8;
|
||||
glformat = GL_RG;
|
||||
gltype = GL_UNSIGNED_BYTE;
|
||||
}
|
||||
|
@ -245,8 +254,8 @@ _cogl_driver_pixel_format_to_gl (CoglContext *context,
|
|||
if (_cogl_has_private_feature
|
||||
(context, COGL_PRIVATE_FEATURE_TEXTURE_FORMAT_BGRA8888))
|
||||
{
|
||||
glintformat = GL_BGRA_EXT;
|
||||
glformat = GL_BGRA_EXT;
|
||||
glintformat = GL_BGRA8;
|
||||
glformat = GL_BGRA;
|
||||
gltype = GL_UNSIGNED_BYTE;
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue