basic lighting question

I want to use gluCylinder(…) in my scene. If i read the glu documentation right the cylinder is smooth shaded by default but in order to see the smooth shading i will have to light the cylinder, otherwise it’s just a flat shape with now definition and concept of depth/form.

Problem is this, if the draw the cylinder in a solid colour, say RED, when lit, I need the cylinder to appear as close to RED at all times from whatever angle, the colour change from the lighting should be minimal.

Is there are simple way to approach this with lighting, what options will give me the desired results ? Or is there another approach.


you should read up on using OpenGL materials. material properties are used to determine a vertex’s color when lit. you can also enable color tracking which will use the color you supply to glColor*() as the vertex material color.


in opengl material, there are 4 colors.
ambient, diffuse, specular, emissive.
opengl compute the diffuse and specular parts and sum all the component.
if your diffuse and specular parts have small luminance, the computed color will be near the ambient+emissive value.