diff options
author | dec05eba <dec05eba@protonmail.com> | 2024-07-26 05:21:47 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2024-07-26 10:55:24 +0200 |
commit | b1d8346ed95f356842455fedb415f97d6c4cacb9 (patch) | |
tree | 90be0f3054f0e5f9988f25290c5fbedf1ee9914e /src/egl.c | |
parent | af4f9b805a947b4495961a519af6045cd3f19a33 (diff) |
Move glClear and glx/eglSwapBuffers from capture backends to main
Diffstat (limited to 'src/egl.c')
-rw-r--r-- | src/egl.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -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); + } +} |