PDA

View Full Version : lighting complications



409er
11-28-2002, 11:44 PM
hi
i think i understand the basics of opengl lighting, but i'm getting all sorts of nasty side effects
in particular, to animate the motion of my character i cycle through frames (using display lists that are generated from 3d models)...and when it cycles the lighting of the world and character turns completely off, or sometimes just the lighting of the character turns off

is it because i'm calling glDisable(GL_VERTEX_2D) in some places? why would enabling/disabling texturing have an effect on lighting?
or if this is way off, then what else could have this aftereffect on my lighting? i'm never calling glDisable(GL_LIGHTING)...

thanks as always for your help

Structural
11-28-2002, 11:50 PM
1) Make sure you have modulating on... DON'T turn on GL_REPLACE with glTexEnv. Lighting is a modulation sort!

2) make sure you have the lighting normals defined properly.

3) ..... eh... that's all I can thing of so far...

409er
11-28-2002, 11:55 PM
sorry i meant glDisable(GL_TEXTURE_2D) not vertex