GLProgramming.com

home :: about :: development guides :: irc :: forums :: search :: paste :: links :: contribute :: code dump

-> Click here to learn how to get live help <-


New Paste :: Recent Pastes:: Add Line Numbers


A Paste by Anonymous
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);
}