Remove unused vector icons

it seems to me the icons are unused:

  - VICO_VIEW3D_VEC
  - VICO_EDIT_VEC
  - VICO_EDITMODE_VEC_DEHLT
  - VICO_EDITMODE_VEC_HLT
  - VICO_DISCLOSURE_TRI_RIGHT_VEC
  - VICO_DISCLOSURE_TRI_DOWN_VEC
  - VICO_MOVE_UP_VEC
  - VICO_MOVE_DOWN_VEC
  - VICO_X_VEC

Since their code contains immediate mode GL calls and they seem to be unused i thought we could remove them.

Reviewers: mont29

Reviewed By: mont29

Subscribers: merwin

Tags: #bf_blender_2.8

Differential Revision: https://developer.blender.org/D2356
This commit is contained in:
Martijn Berger 2016-11-16 10:03:11 +01:00
parent e17b92f535
commit f86eccb1ca
1 changed files with 0 additions and 233 deletions

View File

@ -213,173 +213,6 @@ static void viconutil_set_point(GLint pt[2], int x, int y)
pt[1] = y;
}
static void viconutil_draw_tri(GLint(*pts)[2])
{
glBegin(GL_TRIANGLES);
glVertex2iv(pts[0]);
glVertex2iv(pts[1]);
glVertex2iv(pts[2]);
glEnd();
}
static void viconutil_draw_lineloop(GLint(*pts)[2], int numPoints)
{
int i;
glBegin(GL_LINE_LOOP);
for (i = 0; i < numPoints; i++) {
glVertex2iv(pts[i]);
}
glEnd();
}
static void viconutil_draw_lineloop_smooth(GLint(*pts)[2], int numPoints)
{
glEnable(GL_LINE_SMOOTH);
viconutil_draw_lineloop(pts, numPoints);
glDisable(GL_LINE_SMOOTH);
}
static void viconutil_draw_points(GLint(*pts)[2], int numPoints, int pointSize)
{
int i;
glBegin(GL_QUADS);
for (i = 0; i < numPoints; i++) {
int x = pts[i][0], y = pts[i][1];
glVertex2i(x - pointSize, y - pointSize);
glVertex2i(x + pointSize, y - pointSize);
glVertex2i(x + pointSize, y + pointSize);
glVertex2i(x - pointSize, y + pointSize);
}
glEnd();
}
/* Drawing functions */
static void vicon_x_draw(int x, int y, int w, int h, float alpha)
{
x += 3;
y += 3;
w -= 6;
h -= 6;
glEnable(GL_LINE_SMOOTH);
glLineWidth(2.5);
glColor4f(0.0, 0.0, 0.0, alpha);
glBegin(GL_LINES);
glVertex2i(x, y);
glVertex2i(x + w, y + h);
glVertex2i(x + w, y);
glVertex2i(x, y + h);
glEnd();
glDisable(GL_LINE_SMOOTH);
}
static void vicon_view3d_draw(int x, int y, int w, int h, float alpha)
{
int cx = x + w / 2;
int cy = y + h / 2;
int d = MAX2(2, h / 3);
glColor4f(0.5, 0.5, 0.5, alpha);
glBegin(GL_LINES);
glVertex2i(x, cy - d);
glVertex2i(x + w, cy - d);
glVertex2i(x, cy + d);
glVertex2i(x + w, cy + d);
glVertex2i(cx - d, y);
glVertex2i(cx - d, y + h);
glVertex2i(cx + d, y);
glVertex2i(cx + d, y + h);
glEnd();
glColor4f(0.0, 0.0, 0.0, alpha);
glBegin(GL_LINES);
glVertex2i(x, cy);
glVertex2i(x + w, cy);
glVertex2i(cx, y);
glVertex2i(cx, y + h);
glEnd();
}
static void vicon_edit_draw(int x, int y, int w, int h, float alpha)
{
GLint pts[4][2];
viconutil_set_point(pts[0], x + 3, y + 3);
viconutil_set_point(pts[1], x + w - 3, y + 3);
viconutil_set_point(pts[2], x + w - 3, y + h - 3);
viconutil_set_point(pts[3], x + 3, y + h - 3);
glColor4f(0.0, 0.0, 0.0, alpha);
viconutil_draw_lineloop(pts, 4);
glColor3f(1, 1, 0.0);
viconutil_draw_points(pts, 4, 1);
}
static void vicon_editmode_hlt_draw(int x, int y, int w, int h, float alpha)
{
GLint pts[3][2];
viconutil_set_point(pts[0], x + w / 2, y + h - 2);
viconutil_set_point(pts[1], x + 3, y + 4);
viconutil_set_point(pts[2], x + w - 3, y + 4);
glColor4f(0.5, 0.5, 0.5, alpha);
viconutil_draw_tri(pts);
glColor4f(0.0, 0.0, 0.0, 1);
viconutil_draw_lineloop_smooth(pts, 3);
glColor3f(1, 1, 0.0);
viconutil_draw_points(pts, 3, 1);
}
static void vicon_editmode_dehlt_draw(int x, int y, int w, int h, float UNUSED(alpha))
{
GLint pts[3][2];
viconutil_set_point(pts[0], x + w / 2, y + h - 2);
viconutil_set_point(pts[1], x + 3, y + 4);
viconutil_set_point(pts[2], x + w - 3, y + 4);
glColor4f(0.0f, 0.0f, 0.0f, 1);
viconutil_draw_lineloop_smooth(pts, 3);
glColor3f(0.9f, 0.9f, 0.9f);
viconutil_draw_points(pts, 3, 1);
}
static void vicon_disclosure_tri_right_draw(int x, int y, int w, int UNUSED(h), float alpha)
{
GLint pts[3][2];
int cx = x + w / 2;
int cy = y + w / 2;
int d = w / 3, d2 = w / 5;
viconutil_set_point(pts[0], cx - d2, cy + d);
viconutil_set_point(pts[1], cx - d2, cy - d);
viconutil_set_point(pts[2], cx + d2, cy);
glBegin(GL_TRIANGLES);
glColor4f(0.8f, 0.8f, 0.8f, alpha);
glVertex2iv(pts[0]);
glVertex2iv(pts[1]);
glColor4f(0.3f, 0.3f, 0.3f, alpha);
glVertex2iv(pts[2]);
glEnd();
glColor4f(0.0f, 0.0f, 0.0f, 1);
viconutil_draw_lineloop_smooth(pts, 3);
}
static void vicon_small_tri_right_draw(int x, int y, int w, int UNUSED(h), float alpha)
{
GLint pts[3][2];
@ -400,63 +233,6 @@ static void vicon_small_tri_right_draw(int x, int y, int w, int UNUSED(h), float
glEnd();
}
static void vicon_disclosure_tri_down_draw(int x, int y, int w, int UNUSED(h), float alpha)
{
GLint pts[3][2];
int cx = x + w / 2;
int cy = y + w / 2;
int d = w / 3, d2 = w / 5;
viconutil_set_point(pts[0], cx + d, cy + d2);
viconutil_set_point(pts[1], cx - d, cy + d2);
viconutil_set_point(pts[2], cx, cy - d2);
glBegin(GL_TRIANGLES);
glColor4f(0.8f, 0.8f, 0.8f, alpha);
glVertex2iv(pts[0]);
glVertex2iv(pts[1]);
glColor4f(0.3f, 0.3f, 0.3f, alpha);
glVertex2iv(pts[2]);
glEnd();
glColor4f(0.0f, 0.0f, 0.0f, 1);
viconutil_draw_lineloop_smooth(pts, 3);
}
static void vicon_move_up_draw(int x, int y, int w, int h, float UNUSED(alpha))
{
int d = -2;
glEnable(GL_LINE_SMOOTH);
glLineWidth(1);
glColor3f(0.0, 0.0, 0.0);
glBegin(GL_LINE_STRIP);
glVertex2i(x + w / 2 - d * 2, y + h / 2 + d);
glVertex2i(x + w / 2, y + h / 2 - d + 1);
glVertex2i(x + w / 2 + d * 2, y + h / 2 + d);
glEnd();
glDisable(GL_LINE_SMOOTH);
}
static void vicon_move_down_draw(int x, int y, int w, int h, float UNUSED(alpha))
{
int d = 2;
glEnable(GL_LINE_SMOOTH);
glLineWidth(1);
glColor3f(0.0, 0.0, 0.0);
glBegin(GL_LINE_STRIP);
glVertex2i(x + w / 2 - d * 2, y + h / 2 + d);
glVertex2i(x + w / 2, y + h / 2 - d - 1);
glVertex2i(x + w / 2 + d * 2, y + h / 2 + d);
glEnd();
glDisable(GL_LINE_SMOOTH);
}
static void vicon_keytype_draw_wrapper(int x, int y, int w, int h, float alpha, short key_type)
{
/* init dummy theme state for Action Editor - where these colors are defined
@ -782,15 +558,6 @@ static void init_internal_icons(void)
}
}
def_internal_vicon(VICO_VIEW3D_VEC, vicon_view3d_draw);
def_internal_vicon(VICO_EDIT_VEC, vicon_edit_draw);
def_internal_vicon(VICO_EDITMODE_VEC_DEHLT, vicon_editmode_dehlt_draw);
def_internal_vicon(VICO_EDITMODE_VEC_HLT, vicon_editmode_hlt_draw);
def_internal_vicon(VICO_DISCLOSURE_TRI_RIGHT_VEC, vicon_disclosure_tri_right_draw);
def_internal_vicon(VICO_DISCLOSURE_TRI_DOWN_VEC, vicon_disclosure_tri_down_draw);
def_internal_vicon(VICO_MOVE_UP_VEC, vicon_move_up_draw);
def_internal_vicon(VICO_MOVE_DOWN_VEC, vicon_move_down_draw);
def_internal_vicon(VICO_X_VEC, vicon_x_draw);
def_internal_vicon(VICO_SMALL_TRI_RIGHT_VEC, vicon_small_tri_right_draw);
def_internal_vicon(VICO_KEYTYPE_KEYFRAME_VEC, vicon_keytype_keyframe_draw);