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
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2016-06-09 23:11:14 +0300
committerCampbell Barton <ideasman42@gmail.com>2016-06-09 23:11:14 +0300
commit5da02ab9e249487081afe3ee459f1e8d15a7f674 (patch)
tree017cd34689d905538c1d418c98b8e53f4f247e5e
parentefd547f3da10a247fdcff66e74f9b98ec3abdd39 (diff)
GPU: only call glShadeModel when needed
-rw-r--r--source/blender/gpu/intern/gpu_basic_shader.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/gpu/intern/gpu_basic_shader.c b/source/blender/gpu/intern/gpu_basic_shader.c
index 1e60944c23d..4ac1c48f9d2 100644
--- a/source/blender/gpu/intern/gpu_basic_shader.c
+++ b/source/blender/gpu/intern/gpu_basic_shader.c
@@ -512,7 +512,7 @@ void GPU_basic_shader_bind(int options)
if (options & GPU_SHADER_FLAT_NORMAL) {
glShadeModel(GL_FLAT);
}
- else {
+ else if (bound_options & GPU_SHADER_FLAT_NORMAL) {
glShadeModel(GL_SMOOTH);
}
}