[PATCH] compositor/shm: use internalFormat=GL_BGRA_EXT in TexImage2D

Kristian Høgsberg krh at bitplanet.net
Sun Jan 23 10:57:14 PST 2011


On Sat, Jan 22, 2011 at 11:49 AM, Benjamin Franzke
<benjaminfranzke at googlemail.com> wrote:
> ---
>  compositor/shm.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)

Thanks, applied.

Kristian

> diff --git a/compositor/shm.c b/compositor/shm.c
> index 6b96a5b..913833e 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);
>
> --
> 1.7.3.4
>
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
>


More information about the wayland-devel mailing list