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:21:34 +0300
committerCampbell Barton <ideasman42@gmail.com>2016-06-10 00:50:49 +0300
commitb07508a36209ce5044b9bb55c787de053df85bb2 (patch)
tree1e24d0ee87fa725197bc9ab6b1fb53662397804e
parenta5788a9c477cdafbd2d3e31a458b6aaebb474efb (diff)
Fix GPU logical error changing stipple
-rw-r--r--source/blender/gpu/intern/gpu_basic_shader.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/source/blender/gpu/intern/gpu_basic_shader.c b/source/blender/gpu/intern/gpu_basic_shader.c
index 4ac1c48f9d2..a2b89239344 100644
--- a/source/blender/gpu/intern/gpu_basic_shader.c
+++ b/source/blender/gpu/intern/gpu_basic_shader.c
@@ -502,11 +502,12 @@ void GPU_basic_shader_bind(int options)
else if ((bound_options & GPU_SHADER_LINE) && (bound_options & GPU_SHADER_STIPPLE)) {
glDisable(GL_LINE_STIPPLE);
}
- else {
- if (options & GPU_SHADER_STIPPLE)
- glEnable(GL_POLYGON_STIPPLE);
- else if (bound_options & GPU_SHADER_STIPPLE)
- glDisable(GL_POLYGON_STIPPLE);
+
+ if (((options & GPU_SHADER_LINE) == 0) && (options & GPU_SHADER_STIPPLE)) {
+ glEnable(GL_POLYGON_STIPPLE);
+ }
+ else if (((bound_options & GPU_SHADER_LINE) == 0) && (bound_options & GPU_SHADER_STIPPLE)) {
+ glDisable(GL_POLYGON_STIPPLE);
}
if (options & GPU_SHADER_FLAT_NORMAL) {