From ec6a720b247db7b2300774b5b492bed333877e2b Mon Sep 17 00:00:00 2001 From: frank Date: Thu, 30 Nov 2023 00:34:54 -0500 Subject: [PATCH] set texture wrap to clamp --- src/Texture.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Texture.cpp b/src/Texture.cpp index a2e9be8..c4aadb8 100644 --- a/src/Texture.cpp +++ b/src/Texture.cpp @@ -47,6 +47,10 @@ void Texture::generate(glm::vec2 size, GLenum format, GLint filter) glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, filter); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, filter); + /* Set the texture wrap of this texture */ + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); + sb::Log::gl_errors(); /* Store a copy of size */