PDA

View Full Version : specular light



eckiller
03-03-2000, 08:17 AM
Hi,

Do you need ambient and diffuse or one of them to have specular light. I set up a menu to toggle between the lights to see differant effects but when i enable specular the lights go out. ambient and diffuse work by themselves.

Eric
03-05-2000, 10:20 PM
You must have some kind of an error in your code (ambient, diffuse and specular work separately !).

Could you post you lights initialization code here so that we can have a look at the problem ?

Cheers.

Eric

dmy
03-06-2000, 04:20 AM
remember to set the material shininess with a call to something like
glMaterialf(GL_FRONT,GL_SHININESS,50)

the default is 0, wich is the worst value SGI have chosen http://www.opengl.org/discussion_boards/ubb/smile.gif

also be careful if you're scaling your object: try to enable normalization with
glEnable(GL_NORMALIZE)

Dolo/\/\ightY