I want to set the colour of a cone so that it fades - it is strongest at the point and then fades towards the base
I’m using glMaterialfv(…) to set the colour
cheers
I want to set the colour of a cone so that it fades - it is strongest at the point and then fades towards the base
I’m using glMaterialfv(…) to set the colour
cheers
Originally posted by fox:
[b]I want to set the colour of a cone so that it fades - it is strongest at the point and then fades towards the base
I’m using glMaterialfv(…) to set the colour
cheers [/b]
The easiest way to do it, I think, is making the cone with a GL_TRIANGLE_FAN, and enable smooth shading, glShadeModel(GL_SMOOTH). Now you can specify a new color for each vertex, and the colors of the triangles will smoothly go from black to white or whatever color you want.
good luck!
Nigel