34 # include <OpenGL/glu.h> 48 static GLUquadricObj* getQuadradic()
50 static GLUWrapper inst;
51 return inst._quadratic;
56 _quadratic = gluNewQuadric();
57 gluQuadricNormals(_quadratic, GLU_SMOOTH);
61 gluDeleteQuadric(_quadratic);
63 GLUquadricObj* _quadratic;;
69 gluDisk(GLUWrapper::getQuadradic(), 0, radius, 32, 1);
74 double angleStep = (2 *
M_PI / (segments));
75 glBegin(GL_LINE_STRIP);
76 for (
int i = 0; i <= segments; i++) {
77 double angle = i * angleStep;
78 float x = radius * cos(angle);
79 float y = radius * sin(angle);
80 glVertex3f(x, y, 0.f);
some general case utility functions
void drawDisk(GLfloat radius)
void drawCircle(GLfloat radius, int segments)