From b1d8346ed95f356842455fedb415f97d6c4cacb9 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Fri, 26 Jul 2024 05:21:47 +0200 Subject: Move glClear and glx/eglSwapBuffers from capture backends to main --- src/egl.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/egl.c') diff --git a/src/egl.c b/src/egl.c index 3d4c5c7..da8dc9f 100644 --- a/src/egl.c +++ b/src/egl.c @@ -419,7 +419,6 @@ static bool gsr_egl_load_gl(gsr_egl *self, void *library) { { (void**)&self->glTexSubImage2D, "glTexSubImage2D" }, { (void**)&self->glCopyImageSubData, "glCopyImageSubData" }, { (void**)&self->glGetTexImage, "glGetTexImage" }, - { (void**)&self->glClearTexImage, "glClearTexImage" }, { (void**)&self->glGenFramebuffers, "glGenFramebuffers" }, { (void**)&self->glBindFramebuffer, "glBindFramebuffer" }, { (void**)&self->glDeleteFramebuffers, "glDeleteFramebuffers" }, @@ -651,3 +650,11 @@ void gsr_egl_update(gsr_egl *self) { // TODO: pselect on wl_display_get_fd before doing dispatch wl_display_dispatch(self->wayland.dpy); } + +void gsr_egl_swap_buffers(gsr_egl *self) { + if(self->egl_display) { + self->eglSwapBuffers(self->egl_display, self->egl_surface); + } else if(self->x11.window) { + self->glXSwapBuffers(self->x11.dpy, self->x11.window); + } +} -- cgit v1.2.3