aboutsummaryrefslogtreecommitdiff
path: root/src/utils.c
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2025-03-30 13:46:06 +0200
committerdec05eba <dec05eba@protonmail.com>2025-03-30 13:46:06 +0200
commitad26bc77db6bbc91a71db656060af514ff061a21 (patch)
treec43d909f4e215d44ccac3e7538d94ee1e32a4e7c /src/utils.c
parent74865fad78618439510035deaba47b68a0886603 (diff)
Fix incorrect compute size when scaling image
Diffstat (limited to 'src/utils.c')
-rw-r--r--src/utils.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/utils.c b/src/utils.c
index 943fb2d..24f5a6d 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -684,8 +684,10 @@ unsigned int gl_create_texture(gsr_egl *egl, int width, int height, int internal
egl->glBindTexture(GL_TEXTURE_2D, texture_id);
egl->glTexImage2D(GL_TEXTURE_2D, 0, internal_format, width, height, 0, format, GL_UNSIGNED_BYTE, NULL);
- egl->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
- egl->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+ const float border_color[4] = { 0.0f, 0.0f, 0.0f, 0.0f };
+ egl->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_BORDER);
+ egl->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_BORDER);
+ egl->glTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_BORDER_COLOR, border_color);
egl->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, filter);
egl->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, filter);