From ad26bc77db6bbc91a71db656060af514ff061a21 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sun, 30 Mar 2025 13:46:06 +0200 Subject: Fix incorrect compute size when scaling image --- src/utils.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/utils.c') 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); -- cgit v1.2.3-70-g09d2