View Full Version : GL_DIFFUSE turning everything yellow.

04-08-2011, 07:21 PM
A slightly strange problem. I'm lighting my scene with a few lights, however, if I set GL_DIFFUSE to any value at all, everything in the scene ends up yellow, be it 0, 0, 0, 0 or 1, 1, 1, 1 or any values in between. Most interestingly, if I comment out the line which sets GL_DIFFUSE, LIGHT0 ends up white (as desired) and only lighting what it's supposed to, however LIGHT1 and above end up yellow, I assume because they default to black (which I'm changing but still end up yellow). Setting LIGHT0's GL_DIFFUSE to anything also results in mass yellow. Any help would be much appreciated...

04-09-2011, 04:36 AM
This is now solved in a very strange way: I took the lighting setup calls out of the class wrapper I'd put them in... and the problem is gone. Same code minus two function calls, I'm unsure why this worked, but it's been so very stressful I'm just glad it did.

04-09-2011, 10:41 PM
Maybe you were calling the light setup before u actually had a valid opengl context?