Use glTexSubImage to update the pixels.
glTexImage causes respecification. The DRM buffer a client renders to will be different from that used to create the wl_buffer.
This commit is contained in:
parent
332073b9db
commit
1f411902de
@ -275,9 +275,8 @@ display_create_drm_surface_from_file(struct display *display,
|
|||||||
}
|
}
|
||||||
|
|
||||||
surface = display_create_drm_surface(display, rect);
|
surface = display_create_drm_surface(display, rect);
|
||||||
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA,
|
glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, rect->width, rect->height,
|
||||||
rect->width, rect->height,
|
GL_RGBA, GL_UNSIGNED_BYTE, pixels);
|
||||||
0, GL_RGBA, GL_UNSIGNED_BYTE, pixels);
|
|
||||||
|
|
||||||
gdk_pixbuf_unref(pixbuf);
|
gdk_pixbuf_unref(pixbuf);
|
||||||
|
|
||||||
|
@ -192,8 +192,8 @@ texture_from_png(const char *filename, int width, int height)
|
|||||||
else
|
else
|
||||||
format = GL_RGB;
|
format = GL_RGB;
|
||||||
|
|
||||||
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA,
|
glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, width, height,
|
||||||
width, height, 0, format, GL_UNSIGNED_BYTE, data);
|
format, GL_UNSIGNED_BYTE, data);
|
||||||
|
|
||||||
gdk_pixbuf_unref(pixbuf);
|
gdk_pixbuf_unref(pixbuf);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user