Remove unused code from drawnode.c
The code in question was marked as /* not used in 2.5x yet */.
This commit is contained in:
parent
c72d319b47
commit
279bcd8492
|
@ -3508,85 +3508,6 @@ void node_draw_link_bezier(View2D *v2d, SpaceNode *snode, bNodeLink *link,
|
|||
}
|
||||
}
|
||||
|
||||
#if 0 /* not used in 2.5x yet */
|
||||
static void node_link_straight_points(View2D *UNUSED(v2d), SpaceNode *snode, bNodeLink *link, float coord_array[][2])
|
||||
{
|
||||
if (link->fromsock) {
|
||||
coord_array[0][0] = link->fromsock->locx;
|
||||
coord_array[0][1] = link->fromsock->locy;
|
||||
}
|
||||
else {
|
||||
if (snode == NULL) return;
|
||||
coord_array[0][0] = snode->mx;
|
||||
coord_array[0][1] = snode->my;
|
||||
}
|
||||
if (link->tosock) {
|
||||
coord_array[1][0] = link->tosock->locx;
|
||||
coord_array[1][1] = link->tosock->locy;
|
||||
}
|
||||
else {
|
||||
if (snode == NULL) return;
|
||||
coord_array[1][0] = snode->mx;
|
||||
coord_array[1][1] = snode->my;
|
||||
}
|
||||
}
|
||||
|
||||
void node_draw_link_straight(View2D *v2d, SpaceNode *snode, bNodeLink *link,
|
||||
int th_col1, int do_shaded, int th_col2, int do_triple, int th_col3)
|
||||
{
|
||||
float coord_array[2][2];
|
||||
int i;
|
||||
|
||||
node_link_straight_points(v2d, snode, link, coord_array);
|
||||
|
||||
glEnable(GL_LINE_SMOOTH);
|
||||
|
||||
if (do_triple) {
|
||||
UI_ThemeColorShadeAlpha(th_col3, -80, -120);
|
||||
glLineWidth(4.0f);
|
||||
|
||||
glBegin(GL_LINES);
|
||||
glVertex2fv(coord_array[0]);
|
||||
glVertex2fv(coord_array[1]);
|
||||
glEnd();
|
||||
}
|
||||
|
||||
UI_ThemeColor(th_col1);
|
||||
glLineWidth(1.5f);
|
||||
|
||||
/* XXX using GL_LINES for shaded node lines is a workaround
|
||||
* for Intel hardware, this breaks with GL_LINE_STRIP and
|
||||
* changing color in begin/end blocks.
|
||||
*/
|
||||
if (do_shaded) {
|
||||
glBegin(GL_LINES);
|
||||
for (i = 0; i < LINK_RESOL - 1; ++i) {
|
||||
float t = (float)i / (float)(LINK_RESOL - 1);
|
||||
UI_ThemeColorBlend(th_col1, th_col2, t);
|
||||
glVertex2f((1.0f - t) * coord_array[0][0] + t * coord_array[1][0],
|
||||
(1.0f - t) * coord_array[0][1] + t * coord_array[1][1]);
|
||||
|
||||
t = (float)(i + 1) / (float)(LINK_RESOL - 1);
|
||||
UI_ThemeColorBlend(th_col1, th_col2, t);
|
||||
glVertex2f((1.0f - t) * coord_array[0][0] + t * coord_array[1][0],
|
||||
(1.0f - t) * coord_array[0][1] + t * coord_array[1][1]);
|
||||
}
|
||||
glEnd();
|
||||
}
|
||||
else {
|
||||
glBegin(GL_LINE_STRIP);
|
||||
for (i = 0; i < LINK_RESOL; ++i) {
|
||||
float t = (float)i / (float)(LINK_RESOL - 1);
|
||||
glVertex2f((1.0f - t) * coord_array[0][0] + t * coord_array[1][0],
|
||||
(1.0f - t) * coord_array[0][1] + t * coord_array[1][1]);
|
||||
}
|
||||
glEnd();
|
||||
}
|
||||
|
||||
glDisable(GL_LINE_SMOOTH);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* note; this is used for fake links in groups too */
|
||||
void node_draw_link(View2D *v2d, SpaceNode *snode, bNodeLink *link)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue