PDA

View Full Version : Lighted texture



Mohamed Hassan
01-27-2005, 09:19 AM
Hello all,
The OpenGL doesn't add light to textures automatically.
Can any one help me doing that ?

MHassan

CrazyButcher
01-27-2005, 10:58 AM
glEnable(GL_LIGHT0)
glEnable(GL_LIGHTING)

and make sure your texture environment is GL_MODULATE and you have correct normals for all vertices

http://nehe.gamedev.net
http://www.gametutorials.com

billions of tutorials here, also have lighting explained