View Full Version : Lightening problems

01-18-2001, 09:11 AM
I have some problems with GL lightening.
I have a 3D scene exported from blender with
- normals per vertex
- color per vertex
- texture uv per face

*) material properties ok.
*) light source is ok (position + properties)

When i render with

==> No lighting.
If i don't use TEXTUREs, i have light ok.
What is happening ??

2) I use a glMultMatrix in my rendering code is it ok for lightning ??

01-18-2001, 09:41 AM
At which point are you defining the light's position? The usual way to do it is after setting the world matrix in the modelview matrix (for example, after gluLookAt).
Also, if you enable GL_COLOR_MATERIAL, you have to use glColor to define material properties, not glMaterial.

01-22-2001, 06:15 AM
Thanks i'll try i after my exams...

01-22-2001, 06:44 AM
If lighting works without textures and doesn't work with, you probably have your texture environment set to GL_REPLACE or GL_DECAL. Set it to GL_MODULATE and the lighting should show up.