Advertisement

Problem with Texture Lighting

Started by March 13, 2006 10:01 AM
1 comment, last by FireViper 18 years, 5 months ago
I was trying to add lighting to my game engine, but it seems that all the objects with texture aren't affected by it. If I remove the texture, then it works just fine. Its probably something simple, but I'm not really sure what I'm doing wrong. Anyone have an idea?
To use textures with lighting you'll need to let OpenGL know that you want them blending together with:
glEnable(GL_COLOR_MATERIAL);
Hope that sorts it for you. [smile]
--
Cheers,
Darren Clark
Advertisement
I've tried enabling GL_COLOR_MATERIAL, but still dosen't work.

This topic is closed to new replies.

Advertisement