Advertisement

MESSED UP LIGHTING!!!

Started by May 16, 2001 05:35 PM
10 comments, last by shadowman131 23 years, 9 months ago
I''ll check it out. I need to reboot first though, my Internet access is scrooged in win2k and my compiler is foobar in winME
Check back in maybe 15 minutes.
OK, it looks like the problems are:
a) you're using setting light0 before you enable lighting (switch the two lines)
b) likewise you're setting material color before you enable color materials (I always put the glEnable() stuff first in the function)
c) you should not be using glMaterialfv() with colored materials enabled. Instead, use glColor4fv(TEMP); followed by glColorMaterial(GL_FRONT,GL_DIFFUSE); I tried it and the scene appears lit, but I didn't feel like slogging through what looks like the mutant offspring of at least 5 tutorials to figure out exactly where to put the light and how strong to make it

One last thing: it looks like either the orientation is backward on the cube faces, or you have the light on the wrong side of the scene.

Good luck, keep at it!

Edited by - Chromebender on May 22, 2001 1:05:06 AM

This topic is closed to new replies.

Advertisement