Commit: b07508a36209ce5044b9bb55c787de053df85bb2
Author: Campbell Barton
Date:   Fri Jun 10 06:21:34 2016 +1000
Branches: master
https://developer.blender.org/rBb07508a36209ce5044b9bb55c787de053df85bb2

Fix GPU logical error changing stipple

===================================================================

M       source/blender/gpu/intern/gpu_basic_shader.c

===================================================================

diff --git a/source/blender/gpu/intern/gpu_basic_shader.c 
b/source/blender/gpu/intern/gpu_basic_shader.c
index 4ac1c48..a2b8923 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) {

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to