Original Post
Hey guys,
I modeled a cup (gluCylinder) and some liquid in the cup (also, gluCylinder). It is my goal that the cup be somewhat transparent, and that the liquid inside also be somewhat transparent, although not as much so.
The way I have it now, the cup is transparent, but you can''t see the liquid through the sides. Any ideas? Here is my code:
glEnable(GL_BLEND); // Cup glColor4f(1.0, 1.0, 1.0, 0.9); gluCylinder(gluNewQuadric(), .2, .35, .5, 20.0, 20.0); gluDisk(gluNewQuadric(), 0.0, .2, 20.0, 20.0); // Liquid glColor4f(.85, .75, .06, 0.6); gluCylinder(gluNewQuadric(), .15, .25, .4, 20.0, 20.0); glTranslatef(0.0, 0.0, 0.05); gluDisk(gluNewQuadric(), 0.0, .2, 20.0, 20.0); glTranslatef(0.0, 0.0, 0.35); gluDisk(gluNewQuadric(), 0.0, .3, 20.0, 20.0); glDisable(GL_BLEND);Thanks! Andrew
