[Bf-blender-cvs] [8a547af] master: Remove border clamping. Usually we just want to clamp to edge instead.

Antony Riakiotakis noreply at git.blender.org
Mon Jan 5 14:25:29 CET 2015


Commit: 8a547af2bdf9aeed74e114f4da9d029cc86bd4fc
Author: Antony Riakiotakis
Date:   Mon Jan 5 14:23:15 2015 +0100
Branches: master
https://developer.blender.org/rB8a547af2bdf9aeed74e114f4da9d029cc86bd4fc

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.

===================================================================

M	source/blender/gpu/intern/gpu_extensions.c

===================================================================

diff --git a/source/blender/gpu/intern/gpu_extensions.c b/source/blender/gpu/intern/gpu_extensions.c
index 05c40d6..a6b711f 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);




More information about the Bf-blender-cvs mailing list