compositor/shm: use internalFormat=GL_BGRA_EXT in TexImage2D

This commit is contained in:
Benjamin Franzke 2011-01-22 17:49:48 +01:00 committed by Kristian Høgsberg
parent 7d498b4f1a
commit 2a332dd62e
1 changed files with 2 additions and 2 deletions

View File

@ -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 /* Unbind any EGLImage texture that may be bound, so we don't
* overwrite it.*/ * 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); 0, 0, 0, GL_BGRA_EXT, GL_UNSIGNED_BYTE, NULL);
glTexImage2D(GL_TEXTURE_2D, 0, GL_BGRA_EXT, glTexImage2D(GL_TEXTURE_2D, 0, GL_BGRA_EXT,
buffer->buffer.width, buffer->buffer.height, 0, 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; (struct wlsc_shm_buffer *) buffer_base;
glBindTexture(GL_TEXTURE_2D, es->texture); 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, buffer->buffer.width, buffer->buffer.height, 0,
GL_BGRA_EXT, GL_UNSIGNED_BYTE, buffer->data); GL_BGRA_EXT, GL_UNSIGNED_BYTE, buffer->data);