PDA

View Full Version : Drawing objects



Ulrich
06-21-2004, 08:39 AM
How can I draw for example a cylinder in a cube and both are visible?

grimoire
06-21-2004, 12:41 PM
draw the cylinder then draw the cube(or vice versa depending on what way you want the colors to turn out. then in your init function use
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);

grimoire
06-21-2004, 12:43 PM
oh and make sure you use
glColor4f(whatever colors,0.5);
example
glColor4f(0.0f,0.0f,1.0f,0.5f);/*blue*/