Ejemplo n.º 1
0
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);
}
Ejemplo n.º 2
0
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);
}
Ejemplo n.º 3
0
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);
}
Ejemplo n.º 4
0
static void vicon_small_tri_right_draw(int x, int y, int w, int UNUSED(h), float alpha)
{
	GLint pts[3][2];
	int cx = x + w / 2 - 4;
	int cy = y + w / 2;
	int d = w / 5, d2 = w / 7;

	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);

	glColor4f(0.2f, 0.2f, 0.2f, alpha);

	glBegin(GL_TRIANGLES);
	glVertex2iv(pts[0]);
	glVertex2iv(pts[1]);
	glVertex2iv(pts[2]);
	glEnd();
}
Ejemplo n.º 5
0
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);
}