aboutsummaryrefslogtreecommitdiff
path: root/src/egl.c
diff options
context:
space:
mode:
authordec05eba <dec05eba®protonmail.com>2023-04-22 00:46:48 +0200
committerdec05eba <dec05eba@protonmail.com>2023-04-22 02:13:11 +0200
commite1c613666ea394a2295a5cfb34c6c5e621876293 (patch)
tree44c27d2d74d2730a9db6f314492f2c439de1925f /src/egl.c
parent2021456be0e7b55d12cb2d26bba0281c0c0d1a10 (diff)
kms_vaapi: add cursor capture for amd/intel monitor capture
Always find largest drm buf, to fix some cases when there are multiple planes and we accidentally capture a drm buf that isn't the target buf. We always want the full SCREEN drm buf.
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 7bf6e7f..c830a70 100644
--- a/src/egl.c
+++ b/src/egl.c
@@ -138,7 +138,6 @@ static bool gsr_egl_load_gl(gsr_egl *self, void *library) {
{ (void**)&self->glTexImage2D, "glTexImage2D" },
{ (void**)&self->glCopyImageSubData, "glCopyImageSubData" },
{ (void**)&self->glClearTexImage, "glClearTexImage" },
- { (void**)&self->glGenerateMipmap, "glGenerateMipmap" },
{ (void**)&self->glGenFramebuffers, "glGenFramebuffers" },
{ (void**)&self->glBindFramebuffer, "glBindFramebuffer" },
{ (void**)&self->glDeleteFramebuffers, "glDeleteFramebuffers" },
@@ -149,6 +148,7 @@ static bool gsr_egl_load_gl(gsr_egl *self, void *library) {
{ (void**)&self->glBindBuffer, "glBindBuffer" },
{ (void**)&self->glGenBuffers, "glGenBuffers" },
{ (void**)&self->glBufferData, "glBufferData" },
+ { (void**)&self->glBufferSubData, "glBufferSubData" },
{ (void**)&self->glDeleteBuffers, "glDeleteBuffers" },
{ (void**)&self->glGenVertexArrays, "glGenVertexArrays" },
{ (void**)&self->glBindVertexArray, "glBindVertexArray" },
@@ -170,6 +170,10 @@ static bool gsr_egl_load_gl(gsr_egl *self, void *library) {
{ (void**)&self->glVertexAttribPointer, "glVertexAttribPointer" },
{ (void**)&self->glEnableVertexAttribArray, "glEnableVertexAttribArray" },
{ (void**)&self->glDrawArrays, "glDrawArrays" },
+ { (void**)&self->glEnable, "glEnable" },
+ { (void**)&self->glBlendFunc, "glBlendFunc" },
+ { (void**)&self->glGetUniformLocation, "glGetUniformLocation" },
+ { (void**)&self->glUniform1f, "glUniform1f" },
{ NULL, NULL }
};
@@ -214,6 +218,9 @@ bool gsr_egl_load(gsr_egl *self, Display *dpy) {
if(!gsr_egl_create_window(self))
goto fail;
+ self->glEnable(GL_BLEND);
+ self->glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+
self->egl_library = egl_lib;
self->gl_library = gl_lib;
return true;