[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [42266] trunk/blender/source/blender/ editors/space_node/drawnode.c: Fix for errors in node line drawing on some Intel hardware (bug #29427).
Lukas Toenne
lukas.toenne at googlemail.com
Tue Nov 29 20:50:38 CET 2011
Revision: 42266
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=42266
Author: lukastoenne
Date: 2011-11-29 19:50:34 +0000 (Tue, 29 Nov 2011)
Log Message:
-----------
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).
Modified Paths:
--------------
trunk/blender/source/blender/editors/space_node/drawnode.c
Modified: trunk/blender/source/blender/editors/space_node/drawnode.c
===================================================================
--- trunk/blender/source/blender/editors/space_node/drawnode.c 2011-11-29 19:40:27 UTC (rev 42265)
+++ trunk/blender/source/blender/editors/space_node/drawnode.c 2011-11-29 19:50:34 UTC (rev 42266)
@@ -2595,18 +2595,28 @@
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();
}
- glEnd();
+ else {
+ UI_ThemeColor(th_col1);
+ glBegin(GL_LINE_STRIP);
+ for(i=0; i<=LINK_RESOL; i++) {
+ glVertex2fv(coord_array[i]);
+ }
+ glEnd();
+ }
glDisable(GL_LINE_SMOOTH);
More information about the Bf-blender-cvs
mailing list