PDA

View Full Version : cone in tube



Mr J
11-09-2005, 05:14 PM
I was build a tube using glDrawElements() and cone using standard glu function. Inside the tube there is a cone. My question, I want to see the cone when I come close to the object. What I did so far, I just changed the opacity of the tube but unfortunately I can see the cone. But when I changed the command to build the tube using standard glu function, it's works !! can you tell me what are the problem. Is it because of the glBlendFunc or anything else ??
here I attached portion of the code ..

glEnable(GL_LIGHTING);

glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, L_ONE_MINUS_SRC_ALPHA);
glDepthMask(GL_FALSE);

glPushClientAttrib(GL_CLIENT_VERTEX_ARRAY_BIT);
glInterleavedArrays(GL_N3F_V3F, 0, v6f_cyl);
glDrawElements(GL_TRIANGLES, 96, GL_UNSIGNED_BYTE, indices_table_cyl);
glPopClientAttrib();

glDepthMask(GL_TRUE);
glDisable(GL_BLEND);

glDisable(GL_LIGHTING);

rgpc
11-09-2005, 09:51 PM
Now I remember why I haven't been frequenting this site like I used to.