From 2a332dd62ec67b5feb6a282118b132c39c36d39f Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Sat, 22 Jan 2011 17:49:48 +0100 Subject: [PATCH] compositor/shm: use internalFormat=GL_BGRA_EXT in TexImage2D --- compositor/shm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compositor/shm.c b/compositor/shm.c index 6b96a5b6..913833e6 100644 --- a/compositor/shm.c +++ b/compositor/shm.c @@ -61,7 +61,7 @@ shm_buffer_attach(struct wl_buffer *buffer_base, struct wl_surface *surface) /* Unbind any EGLImage texture that may be bound, so we don't * overwrite it.*/ - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, + glTexImage2D(GL_TEXTURE_2D, 0, GL_BGRA_EXT, 0, 0, 0, GL_BGRA_EXT, GL_UNSIGNED_BYTE, NULL); glTexImage2D(GL_TEXTURE_2D, 0, GL_BGRA_EXT, buffer->buffer.width, buffer->buffer.height, 0, @@ -79,7 +79,7 @@ shm_buffer_damage(struct wl_buffer *buffer_base, (struct wlsc_shm_buffer *) buffer_base; glBindTexture(GL_TEXTURE_2D, es->texture); - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, + glTexImage2D(GL_TEXTURE_2D, 0, GL_BGRA_EXT, buffer->buffer.width, buffer->buffer.height, 0, GL_BGRA_EXT, GL_UNSIGNED_BYTE, buffer->data);