render/gles2: remove global state, use OpenGL debug extension

This commit is contained in:
emersion 2018-03-20 19:14:33 +01:00
parent ff2e08aa74
commit 95e86e675a
No known key found for this signature in database
GPG key ID: 0FDE7BE0E88F5E48
10 changed files with 526 additions and 372 deletions

View file

@ -4,7 +4,7 @@
#include <wlr/render/wlr_texture.h>
void wlr_texture_init(struct wlr_texture *texture,
struct wlr_texture_impl *impl) {
const struct wlr_texture_impl *impl) {
texture->impl = impl;
wl_signal_init(&texture->destroy_signal);
}
@ -17,10 +17,6 @@ void wlr_texture_destroy(struct wlr_texture *texture) {
}
}
void wlr_texture_bind(struct wlr_texture *texture) {
texture->impl->bind(texture);
}
bool wlr_texture_upload_pixels(struct wlr_texture *texture, uint32_t format,
int stride, int width, int height, const unsigned char *pixels) {
return texture->impl->upload_pixels(texture, format, stride,