render/gles2: use format bpp when reading pixels

This commit is contained in:
emersion 2018-01-26 23:13:41 +01:00
parent 4fa90b0511
commit f34a1b75eb
No known key found for this signature in database
GPG key ID: 0FDE7BE0E88F5E48
2 changed files with 5 additions and 1 deletions

View file

@ -25,12 +25,16 @@ struct pixel_format formats[] = {
},
{
.wl_format = WL_SHM_FORMAT_XBGR8888,
.depth = 24,
.bpp = 32,
.gl_format = GL_RGBA,
.gl_type = GL_UNSIGNED_BYTE,
.shader = &shaders.rgbx
},
{
.wl_format = WL_SHM_FORMAT_ABGR8888,
.depth = 32,
.bpp = 32,
.gl_format = GL_RGBA,
.gl_type = GL_UNSIGNED_BYTE,
.shader = &shaders.rgba