void drawSilo(void)
{
GLUquadricObj *cylinder, *cone;
glPushMatrix();
SET_GRAY;
glRotatef(90, -1, 0, 0);
cylinder = gluNewQuadric();
cone = gluNewQuadric();
gluQuadricDrawStyle(cylinder, GLU_FILL);
gluQuadricDrawStyle(cone, GLU_FILL);
gluQuadricNormals(cylinder, GLU_SMOOTH);
gluQuadricNormals(cone, GLU_SMOOTH);
gluCylinder(cylinder, 3, 3, 2, 20, 20);
glTranslatef(0, 0, 2);
gluCylinder(cylinder, 3.2, 0, 1, 20, 20);
glPopMatrix();
gluDeleteQuadric(cylinder);
} |