cone in tube

I have a problem to show the cone inside the tube ? Can I see the cone just change the opacity of the tube from 1 to 0. When I did that, the tube became white instead of transparent. There is any idea to do that ?

Did you

// Draw the cone!
glEnable(GL_BLEND);
glColor4f(r,g,b,0.5f);
// Draw the tube!
glDisable(GL_BLEND);

in your code?

wow you really did it. you posted the same question three times. iā€™m amazed.

glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
// Draw Cone
glDisable(GL_BLEND);

glEnable(GL_DEPTH_TEST);
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
// Draw Tube
glDisable(GL_BLEND);
glDisable(GL_DEPTH_TEST);

Is it correct the organize of the code ?
What I want, when I change the alpha value to ā€˜0ā€™ I can see the cone ā€¦