2 Copyright (C) 1999-2007 id Software, Inc. and contributors.
3 For a list of contributors, see the accompanying CONTRIBUTORS file.
5 This file is part of GtkRadiant.
7 GtkRadiant is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
12 GtkRadiant is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with GtkRadiant; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
23 #include "picomodel.h"
25 void pivot_draw(const vec3_t pivot)
27 vec3_t vCenter, vMin, vMax;
28 VectorCopy(pivot, vCenter);
30 g_QglTable.m_pfn_qglPointSize(4);
32 g_QglTable.m_pfn_qglBegin(GL_POINTS);
33 g_QglTable.m_pfn_qglVertex3fv(vCenter);
34 g_QglTable.m_pfn_qglEnd();
36 g_QglTable.m_pfn_qglBegin(GL_LINES);
38 g_QglTable.m_pfn_qglVertex3fv(vCenter);
40 g_QglTable.m_pfn_qglVertex3fv(vCenter);
43 g_QglTable.m_pfn_qglVertex3fv(vCenter);
45 g_QglTable.m_pfn_qglVertex3fv(vCenter);
48 g_QglTable.m_pfn_qglVertex3fv(vCenter);
50 g_QglTable.m_pfn_qglVertex3fv(vCenter);
52 g_QglTable.m_pfn_qglEnd();
54 VectorCopy(vCenter, vMin);
55 VectorCopy(vCenter, vMax);
63 g_QglTable.m_pfn_qglBegin(GL_LINE_LOOP);
64 g_QglTable.m_pfn_qglVertex3f(vMin[0],vMin[1],vMin[2]);
65 g_QglTable.m_pfn_qglVertex3f(vMax[0],vMin[1],vMin[2]);
66 g_QglTable.m_pfn_qglVertex3f(vMax[0],vMax[1],vMin[2]);
67 g_QglTable.m_pfn_qglVertex3f(vMin[0],vMax[1],vMin[2]);
68 g_QglTable.m_pfn_qglEnd();
70 g_QglTable.m_pfn_qglBegin(GL_LINE_LOOP);
71 g_QglTable.m_pfn_qglVertex3f(vMin[0],vMin[1],vMax[2]);
72 g_QglTable.m_pfn_qglVertex3f(vMax[0],vMin[1],vMax[2]);
73 g_QglTable.m_pfn_qglVertex3f(vMax[0],vMax[1],vMax[2]);
74 g_QglTable.m_pfn_qglVertex3f(vMin[0],vMax[1],vMax[2]);
75 g_QglTable.m_pfn_qglEnd();
77 g_QglTable.m_pfn_qglBegin(GL_LINES);
78 g_QglTable.m_pfn_qglVertex3f(vMin[0],vMin[1],vMin[2]);
79 g_QglTable.m_pfn_qglVertex3f(vMin[0],vMin[1],vMax[2]);
80 g_QglTable.m_pfn_qglVertex3f(vMin[0],vMax[1],vMax[2]);
81 g_QglTable.m_pfn_qglVertex3f(vMin[0],vMax[1],vMin[2]);
82 g_QglTable.m_pfn_qglVertex3f(vMax[0],vMin[1],vMin[2]);
83 g_QglTable.m_pfn_qglVertex3f(vMax[0],vMin[1],vMax[2]);
84 g_QglTable.m_pfn_qglVertex3f(vMax[0],vMax[1],vMax[2]);
85 g_QglTable.m_pfn_qglVertex3f(vMax[0],vMax[1],vMin[2]);
86 g_QglTable.m_pfn_qglEnd();