Problem with lighting model on TNT2 boards
I'm working on a Lightwave object viewer in wich I set up my lighting model like so:
I then set the color of my faces using:
glColorMaterial(GL_FRONT_AND_BACK, GL_DIFFUSE );
It works fine on the riva 128 I'm using at work and with software implementations (both the microsoft and SGI one)
but on my TNT2 (nVidia ref. drivers 3.68) only the backfaces are lit...
I found some walk around this problem, but none of them are satisfying.
If I set the GL_LIGHT_MODEL_TWO_SIDE to false for instance, it works properly - the front faces are lit correctly -
but obviously the back faces are not and that's not suitable for my application.
If I set GL_LIGHT_MODEL_LOCAL_VIEWER to TRUE, the lighting behave properly this time - all front and back faces are
lit - but it obviously comes with a big performance hit, wich is made even more unacceptable by the fact that my
viewpoint is fixed (therefore GL_LIGHT_MODEL_LOCAL_VIEWER is useless).
One last interesting point is that if I use glColorMaterial(GL_FRONT, GL_DIFFUSE ) instead of
glColorMaterial(GL_FRONT_AND_BACK...), everything is lit properly, but then again it doesn't do what I want (since
only the front faces are colored).
Has anyone run into that problem - that looks like a bug in the nVidia ICD to me - before ? Any ideas ?
Re: Problem with lighting model on TNT2 boards
I think you should head to nvidia developper section and look if they talk about opengl ligthing on their cards