This is a part of my C code, and my aim is to combine a Teapot and a cylinder.What I want is the cylinder to appear through the teapot.What changes should I do? Urgent…
glPushMatrix();
glTranslatef(30,-30,0);
glRotatef(-80,1,0,0);
glColor4f(1.0, 0.0, 0.0,1.0);
GLUquadricObj *p2 = gluNewQuadric();
gluQuadricDrawStyle(p2,GLU_FILL);
gluCylinder(p2, 2.0, 2.0, 40.0, 1000, 100);
//glPushMatrix();
glRotatef(90,1,0,0);
glTranslatef(0,25,0);
glColor4f(0.0,0.5,0.7,0.0);
glutSolidTeapot(4.0);
//glPopMatrix();
glPopMatrix();