Fall back to cairo image backend and shm surface if we don't have cairo gl

This commit is contained in:
Kristian Høgsberg 2010-10-25 11:40:03 -04:00
parent 6866856dfd
commit d0c3b9da22
4 changed files with 331 additions and 100 deletions

View file

@ -52,6 +52,12 @@ shm_buffer_attach(struct wl_buffer *buffer_base, struct wl_surface *surface)
(struct wlsc_shm_buffer *) buffer_base;
glBindTexture(GL_TEXTURE_2D, es->texture);
/* Unbind any EGLImage texture that may be bound, so we don't
* overwrite it.*/
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA,
0, 0, 0, GL_BGRA_EXT, GL_UNSIGNED_BYTE, NULL);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA,
buffer->base.width, buffer->base.height, 0,
GL_BGRA_EXT, GL_UNSIGNED_BYTE, buffer->data);