#include "compositor.h"
-
static void
destroy_buffer(struct wl_resource *resource, struct wl_client *client)
{
(struct wlsc_shm_buffer *) buffer_base;
glBindTexture(GL_TEXTURE_2D, es->texture);
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB,
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA,
buffer->base.width, buffer->base.height, 0,
- GL_RGBA, GL_UNSIGNED_BYTE, buffer->data);
+ GL_BGRA_EXT, GL_UNSIGNED_BYTE, buffer->data);
es->visual = buffer->base.visual;
}
(struct wlsc_shm_buffer *) buffer_base;
glBindTexture(GL_TEXTURE_2D, es->texture);
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB,
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA,
buffer->base.width, buffer->base.height, 0,
- GL_RGBA, GL_UNSIGNED_BYTE, buffer->data);
+ GL_BGRA_EXT, GL_UNSIGNED_BYTE, buffer->data);
/* Hmm, should use glTexSubImage2D() here but GLES2 doesn't
* support any unpack attributes except GL_UNPACK_ALIGNMENT. */