From 3581573bdcbe3c905eae83af53cccbcdd52edad2 Mon Sep 17 00:00:00 2001 From: emersion Date: Tue, 20 Mar 2018 23:10:42 +0100 Subject: render/gles2: make wlr_renderer_begin take viewport size This allows raw GL calls outside wlr_renderer to be removed. --- render/gles2/renderer.c | 6 +++--- render/wlr_renderer.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'render') diff --git a/render/gles2/renderer.c b/render/gles2/renderer.c index 14eea666..6b046bc4 100644 --- a/render/gles2/renderer.c +++ b/render/gles2/renderer.c @@ -26,13 +26,13 @@ static struct wlr_gles2_renderer *gles2_get_renderer( return renderer; } -static void gles2_begin(struct wlr_renderer *wlr_renderer, - struct wlr_output *output) { +static void gles2_begin(struct wlr_renderer *wlr_renderer, uint32_t width, + uint32_t height) { gles2_get_renderer(wlr_renderer); GLES2_DEBUG_PUSH; - glViewport(0, 0, output->width, output->height); + glViewport(0, 0, width, height); // enable transparency glEnable(GL_BLEND); diff --git a/render/wlr_renderer.c b/render/wlr_renderer.c index 79e0b5d5..622aa1dd 100644 --- a/render/wlr_renderer.c +++ b/render/wlr_renderer.c @@ -17,8 +17,8 @@ void wlr_renderer_destroy(struct wlr_renderer *r) { } } -void wlr_renderer_begin(struct wlr_renderer *r, struct wlr_output *o) { - r->impl->begin(r, o); +void wlr_renderer_begin(struct wlr_renderer *r, int width, int height) { + r->impl->begin(r, width, height); } void wlr_renderer_end(struct wlr_renderer *r) { -- cgit v1.2.3