aboutsummaryrefslogtreecommitdiff
path: root/src/egl.c
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2024-09-26 02:23:56 +0200
committerdec05eba <dec05eba@protonmail.com>2024-09-26 02:23:56 +0200
commitaa2fa1e17e1f2e6f2d31347e3f4ed2bff3806ed5 (patch)
tree3b9d2c993acb608062e30d7b44da630174208d4d /src/egl.c
parent2b60c02181884988dba8afbe91ce56aa3dbbabc2 (diff)
Add template for vulkan video encoding
Diffstat (limited to 'src/egl.c')
-rw-r--r--src/egl.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/egl.c b/src/egl.c
index 05d6680..b28769d 100644
--- a/src/egl.c
+++ b/src/egl.c
@@ -262,12 +262,12 @@ static bool gsr_egl_create_window(gsr_egl *self, bool wayland) {
fprintf(stderr, "gsr error: gsr_egl_create_window failed: eglInitialize failed\n");
goto fail;
}
-
+
if(!self->eglChooseConfig(self->egl_display, attr, &ecfg, 1, &num_config) || num_config != 1) {
fprintf(stderr, "gsr error: gsr_egl_create_window failed: failed to find a matching config\n");
goto fail;
}
-
+
self->egl_context = self->eglCreateContext(self->egl_display, ecfg, NULL, ctxattr);
if(!self->egl_context) {
fprintf(stderr, "gsr error: gsr_egl_create_window failed: failed to create egl context\n");
@@ -708,6 +708,10 @@ bool gsr_egl_process_event(gsr_egl *self) {
}
void gsr_egl_swap_buffers(gsr_egl *self) {
+ /* This uses less cpu than swap buffer on nvidia */
+ // TODO:
+ //self->glFlush();
+ //self->glFinish();
if(self->egl_display) {
self->eglSwapBuffers(self->egl_display, self->egl_surface);
} else if(self->x11.window) {