forked from bartvdbraak/blender
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.
This commit is contained in:
parent
89b654dc56
commit
8a547af2bd
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user