Fix for errors in node line drawing on some Intel hardware (bug #29427). This seems...
authorLukas Toenne <lukas.toenne@googlemail.com>
Tue, 29 Nov 2011 19:50:34 +0000 (19:50 +0000)
committerLukas Toenne <lukas.toenne@googlemail.com>
Tue, 29 Nov 2011 19:50:34 +0000 (19:50 +0000)
There has been a comment on the bug tracker about similar issues with drawing in logic buttons, this should be checked as well (Note on the bf-committers ML).

source/blender/editors/space_node/drawnode.c

index 4e9ac08..80d1f30 100644 (file)
@@ -2595,18 +2595,28 @@ void node_draw_link_bezier(View2D *v2d, SpaceNode *snode, bNodeLink *link, int t
                        glEnd();
                }
                
-               UI_ThemeColor(th_col1);
                glLineWidth(1.5f);
-               
-               glBegin(GL_LINE_STRIP);
-               for(i=0; i<=LINK_RESOL; i++) {
-                       if(do_shaded) {
+               if(do_shaded) {
+                       glBegin(GL_LINES);
+                       for(i=0; i<LINK_RESOL; i++) {
                                UI_ThemeColorBlend(th_col1, th_col2, spline_step);
+                               glVertex2fv(coord_array[i]);
+                               
+                               UI_ThemeColorBlend(th_col1, th_col2, spline_step+dist);
+                               glVertex2fv(coord_array[i+1]);
+                               
                                spline_step += dist;
                        }
-                       glVertex2fv(coord_array[i]);
+                       glEnd();
+               }
+               else {
+                       UI_ThemeColor(th_col1);
+                       glBegin(GL_LINE_STRIP);
+                       for(i=0; i<=LINK_RESOL; i++) {
+                               glVertex2fv(coord_array[i]);
+                       }
+                       glEnd();
                }
-               glEnd();
                
                glDisable(GL_LINE_SMOOTH);