Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: Problem with lighting model on TNT2 boards

  1. #1
    Junior Member Newbie
    Join Date
    Feb 2000
    Location
    UK
    Posts
    2

    Problem with lighting model on TNT2 boards

    Hi,
    I'm working on a Lightwave object viewer in wich I set up my lighting model like so:

    glLightModeli(GL_LIGHT_MODEL_LOCAL_VIEWER, GL_FALSE);
    glLightModeli(GL_LIGHT_MODEL_TWO_SIDE,GL_TRUE);

    I then set the color of my faces using:

    glEnable(GL_COLOR_MATERIAL );
    glColorMaterial(GL_FRONT_AND_BACK, GL_DIFFUSE );
    ..
    glColor3fv(0.5,0.5,0.5,1.0);

    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 ?

    Thanks,
    fred.

  2. #2
    Advanced Member Frequent Contributor
    Join Date
    Feb 2000
    Posts
    569

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •