View Full Version : 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?
Vexator
11-10-2005, 11:59 AM
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 .....
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.