Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/blender/gpu/intern/gpu_basic_shader.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/gpu/intern/gpu_basic_shader.c b/source/blender/gpu/intern/gpu_basic_shader.c
index c01d5321fe3..8a365893192 100644
--- a/source/blender/gpu/intern/gpu_basic_shader.c
+++ b/source/blender/gpu/intern/gpu_basic_shader.c
@@ -362,8 +362,11 @@ static GPUShader *gpu_basic_shader(int options)
if (shader) {
/* set texture map to first texture unit */
- if (options & GPU_SHADER_TEXTURE_2D)
+ if (options & GPU_SHADER_TEXTURE_2D) {
+ GPU_shader_bind(shader);
glUniform1i(GPU_shader_get_uniform(shader, "texture_map"), 0);
+ GPU_shader_unbind();
+ }
GPU_MATERIAL_STATE.cached_shaders[options] = shader;
}