diff options
author | dec05eba <dec05eba@protonmail.com> | 2025-03-30 13:46:06 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2025-03-30 13:46:06 +0200 |
commit | ad26bc77db6bbc91a71db656060af514ff061a21 (patch) | |
tree | c43d909f4e215d44ccac3e7538d94ee1e32a4e7c /src/pipewire_video.c | |
parent | 74865fad78618439510035deaba47b68a0886603 (diff) |
Fix incorrect compute size when scaling image
Diffstat (limited to 'src/pipewire_video.c')
-rw-r--r-- | src/pipewire_video.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/pipewire_video.c b/src/pipewire_video.c index 3f7b2df..bbc3f5d 100644 --- a/src/pipewire_video.c +++ b/src/pipewire_video.c @@ -736,11 +736,13 @@ static void gsr_pipewire_video_update_cursor_texture(gsr_pipewire_video *self, g if(!self->cursor.data) return; + const float border_color[4] = { 0.0f, 0.0f, 0.0f, 0.0f }; self->egl->glBindTexture(GL_TEXTURE_2D, texture_map.cursor_texture_id); // TODO: glTextureSubImage2D if same size self->egl->glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, self->cursor.width, self->cursor.height, 0, GL_RGBA, GL_UNSIGNED_BYTE, self->cursor.data); - self->egl->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); - self->egl->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); + self->egl->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_BORDER); + self->egl->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_BORDER); + self->egl->glTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_BORDER_COLOR, border_color); self->egl->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); self->egl->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); self->egl->glBindTexture(GL_TEXTURE_2D, 0); |