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:
authorLukas Toenne <lukas.toenne@googlemail.com>2011-11-29 23:50:34 +0400
committerLukas Toenne <lukas.toenne@googlemail.com>2011-11-29 23:50:34 +0400
commitba9fac019237918d8066a54bf8de160b211fcc97 (patch)
treee7aeff45913484de1430924a6d3cd3a440d93c8e /source/blender/editors/space_node/drawnode.c
parent9d9fbae7bcf927cfd51cec8c727218ae81764b84 (diff)
Fix for errors in node line drawing on some Intel hardware (bug #29427). This seems to be caused by a driver bug that breaks GL_LINE_STRIP drawing in combination with color changes inside the begin/end block. Simply replacing by GL_LINES seems to fix the problem and should not cause trouble for this small amount of drawing.
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).
Diffstat (limited to 'source/blender/editors/space_node/drawnode.c')
-rw-r--r--source/blender/editors/space_node/drawnode.c24
1 files changed, 17 insertions, 7 deletions
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c
index 4e9ac08d8c8..80d1f30209e 100644
--- a/source/blender/editors/space_node/drawnode.c
+++ b/source/blender/editors/space_node/drawnode.c
@@ -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);