From 8a547af2bdf9aeed74e114f4da9d029cc86bd4fc Mon Sep 17 00:00:00 2001 From: Antony Riakiotakis Date: Mon, 5 Jan 2015 14:23:15 +0100 Subject: [PATCH] Remove border clamping. Usually we just want to clamp to edge instead. Note - checked all glTexImage functions and we never use that. Border is ifdefed out too here. --- source/blender/gpu/intern/gpu_extensions.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/source/blender/gpu/intern/gpu_extensions.c b/source/blender/gpu/intern/gpu_extensions.c index 05c40d65df5..a6b711fd556 100644 --- a/source/blender/gpu/intern/gpu_extensions.c +++ b/source/blender/gpu/intern/gpu_extensions.c @@ -462,15 +462,8 @@ static GPUTexture *GPU_texture_create_nD(int w, int h, int n, float *fpixels, in } if (tex->target != GL_TEXTURE_1D) { - /* CLAMP_TO_BORDER is an OpenGL 1.3 core feature */ - GLenum wrapmode = (depth || tex->h == 1)? GL_CLAMP_TO_EDGE: GL_CLAMP_TO_BORDER; - glTexParameteri(tex->target, GL_TEXTURE_WRAP_S, wrapmode); - glTexParameteri(tex->target, GL_TEXTURE_WRAP_T, wrapmode); - -#if 0 - float borderColor[] = { 1.0f, 1.0f, 1.0f, 1.0f }; - glTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_BORDER_COLOR, borderColor); -#endif + glTexParameteri(tex->target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); + glTexParameteri(tex->target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); } else glTexParameteri(tex->target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);