From 1901c3e1b64cff3440b0b3b27ad9db06645a29e6 Mon Sep 17 00:00:00 2001 From: nyorain Date: Thu, 10 Aug 2017 11:03:15 +0200 Subject: [PATCH] Fix example for updated gles --- examples/compositor/main.c | 2 +- examples/rotation.c | 2 +- examples/tablet.c | 3 +-- examples/touch.c | 2 +- include/render/gles2.h | 2 +- 5 files changed, 5 insertions(+), 6 deletions(-) diff --git a/examples/compositor/main.c b/examples/compositor/main.c index 1fbb38ad..7ac549e5 100644 --- a/examples/compositor/main.c +++ b/examples/compositor/main.c @@ -67,7 +67,7 @@ int main() { }; compositor_init(&compositor); - state.renderer = wlr_gles2_renderer_init(compositor.backend->egl); + state.renderer = wlr_gles2_renderer_init(); wl_display_init_shm(compositor.display); wl_compositor_init(compositor.display, &state.compositor, state.renderer); wl_shell_init(compositor.display, &state.shell); diff --git a/examples/rotation.c b/examples/rotation.c index 9ece1b92..34994e04 100644 --- a/examples/rotation.c +++ b/examples/rotation.c @@ -204,7 +204,7 @@ int main(int argc, char *argv[]) { compositor.keyboard_key_cb = handle_keyboard_key; compositor_init(&compositor); - state.renderer = wlr_gles2_renderer_init(compositor.backend->egl); + state.renderer = wlr_gles2_renderer_init(); state.cat_texture = wlr_render_texture_init(state.renderer); wlr_texture_upload_pixels(state.cat_texture, WL_SHM_FORMAT_ABGR8888, cat_tex.width, cat_tex.width, cat_tex.height, cat_tex.pixel_data); diff --git a/examples/tablet.c b/examples/tablet.c index 178ccc09..4a7d9f74 100644 --- a/examples/tablet.c +++ b/examples/tablet.c @@ -152,8 +152,7 @@ int main(int argc, char *argv[]) { }; compositor_init(&compositor); - state.renderer = wlr_gles2_renderer_init(compositor.backend->egl); - + state.renderer = wlr_gles2_renderer_init(); compositor_run(&compositor); wlr_renderer_destroy(state.renderer); diff --git a/examples/touch.c b/examples/touch.c index b3f32855..76b92ad2 100644 --- a/examples/touch.c +++ b/examples/touch.c @@ -104,7 +104,7 @@ int main(int argc, char *argv[]) { }; compositor_init(&compositor); - state.renderer = wlr_gles2_renderer_init(compositor.backend->egl); + state.renderer = wlr_gles2_renderer_init(); state.cat_texture = wlr_render_texture_init(state.renderer); wlr_texture_upload_pixels(state.cat_texture, WL_SHM_FORMAT_ARGB8888, cat_tex.width, cat_tex.width, cat_tex.height, cat_tex.pixel_data); diff --git a/include/render/gles2.h b/include/render/gles2.h index 7ad4ad2e..cb78a181 100644 --- a/include/render/gles2.h +++ b/include/render/gles2.h @@ -31,7 +31,7 @@ struct shaders { GLuint rgba, rgbx; GLuint quad; GLuint ellipse; - Gluint external; + GLuint external; }; extern struct shaders shaders;