diff options
author | Kristian Høgsberg <krh@bitplanet.net> | 2010-10-08 09:32:55 -0400 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2010-10-08 09:32:55 -0400 |
commit | a969c8a7f055a35aa5d3acfc865adffde29c7f62 (patch) | |
tree | 401708373f58ae082f3161a18ed556f4949e49ac /compositor | |
parent | 25694e7c3c31e4a4d29ea77865018cde73694a79 (diff) |
Use GL_BGRA_EXT for shm texture uploads
Diffstat (limited to 'compositor')
-rw-r--r-- | compositor/shm.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/compositor/shm.c b/compositor/shm.c index 2f1245b..045eabc 100644 --- a/compositor/shm.c +++ b/compositor/shm.c @@ -24,7 +24,6 @@ #include "compositor.h" - static void destroy_buffer(struct wl_resource *resource, struct wl_client *client) { @@ -53,9 +52,9 @@ shm_buffer_attach(struct wl_buffer *buffer_base, struct wl_surface *surface) (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; } @@ -69,9 +68,9 @@ 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_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. */ |