[Bf-blender-cvs] [41455279755] tmp-texture-sampler: Fix GL_TEXTURE_MAX_ANISOTROPY_EXT not being optional
Clément Foucault
noreply at git.blender.org
Mon May 25 11:42:37 CEST 2020
Commit: 414552797555c884c8be19f0b7e7284e5d9e60ff
Author: Clément Foucault
Date: Mon May 25 11:38:58 2020 +0200
Branches: tmp-texture-sampler
https://developer.blender.org/rB414552797555c884c8be19f0b7e7284e5d9e60ff
Fix GL_TEXTURE_MAX_ANISOTROPY_EXT not being optional
===================================================================
M source/blender/gpu/intern/gpu_texture.c
===================================================================
diff --git a/source/blender/gpu/intern/gpu_texture.c b/source/blender/gpu/intern/gpu_texture.c
index 9d7ec176ea1..4ca7f62bff7 100644
--- a/source/blender/gpu/intern/gpu_texture.c
+++ b/source/blender/gpu/intern/gpu_texture.c
@@ -2054,7 +2054,9 @@ void GPU_samplers_init(void)
glSamplerParameteri(GG.samplers[i], GL_TEXTURE_MAG_FILTER, mag_filter);
glSamplerParameteri(GG.samplers[i], GL_TEXTURE_COMPARE_MODE, compare_mode);
glSamplerParameteri(GG.samplers[i], GL_TEXTURE_COMPARE_FUNC, GL_LEQUAL);
- glSamplerParameterf(GG.samplers[i], GL_TEXTURE_MAX_ANISOTROPY_EXT, aniso_filter);
+ if (GLEW_EXT_texture_filter_anisotropic) {
+ glSamplerParameterf(GG.samplers[i], GL_TEXTURE_MAX_ANISOTROPY_EXT, aniso_filter);
+ }
/** Other states are left to default:
* - GL_TEXTURE_BORDER_COLOR is {0, 0, 0, 0}.
More information about the Bf-blender-cvs
mailing list