aboutsummaryrefslogtreecommitdiff
path: root/src/egl.c
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2024-07-26 05:21:47 +0200
committerdec05eba <dec05eba@protonmail.com>2024-07-26 10:55:24 +0200
commitb1d8346ed95f356842455fedb415f97d6c4cacb9 (patch)
tree90be0f3054f0e5f9988f25290c5fbedf1ee9914e /src/egl.c
parentaf4f9b805a947b4495961a519af6045cd3f19a33 (diff)
Move glClear and glx/eglSwapBuffers from capture backends to main
Diffstat (limited to 'src/egl.c')
-rw-r--r--src/egl.c9
1 files changed, 8 insertions, 1 deletions
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);
+ }
+}