diff options
Diffstat (limited to 'render/gles2/renderer.c')
-rw-r--r-- | render/gles2/renderer.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/render/gles2/renderer.c b/render/gles2/renderer.c index 327d197e..1b106af5 100644 --- a/render/gles2/renderer.c +++ b/render/gles2/renderer.c @@ -433,6 +433,9 @@ static void gles2_destroy(struct wlr_renderer *wlr_renderer) { static struct wlr_render_pass *gles2_begin_buffer_pass(struct wlr_renderer *wlr_renderer, struct wlr_buffer *wlr_buffer, const struct wlr_buffer_pass_options *options) { struct wlr_gles2_renderer *renderer = gles2_get_renderer(wlr_renderer); + + struct wlr_egl_context prev_ctx = {0}; + wlr_egl_save_context(&prev_ctx); if (!wlr_egl_make_current(renderer->egl)) { return NULL; } @@ -448,7 +451,7 @@ static struct wlr_render_pass *gles2_begin_buffer_pass(struct wlr_renderer *wlr_ return NULL; } - struct wlr_gles2_render_pass *pass = begin_gles2_buffer_pass(buffer, timer); + struct wlr_gles2_render_pass *pass = begin_gles2_buffer_pass(buffer, &prev_ctx, timer); if (!pass) { return NULL; } |