hieubt-seta / iphonewavefrontloader

Automatically exported from code.google.com/p/iphonewavefrontloader
0 stars 0 forks source link

Wrong Light 2 setup #3

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Only One Light (GL_LIGHT0) is currently active.

The Second light (GL_LIGHT1)is set up like this.

        glEnable(GL_LIGHT1);
    glLightfv(GL_LIGHT1, GL_AMBIENT, lightAmbient);
    glLightfv(GL_LIGHT2, GL_DIFFUSE, lightDiffuse);
    glLightfv(GL_LIGHT2, GL_POSITION, light2Position); 
    glLightfv(GL_LIGHT2, GL_SHININESS, &lightShininess);

While it should be
        glEnable(GL_LIGHT1);
    glLightfv(GL_LIGHT1, GL_AMBIENT, lightAmbient);
    glLightfv(GL_LIGHT1, GL_DIFFUSE, lightDiffuse);
    glLightfv(GL_LIGHT1, GL_POSITION, light2Position); 
    glLightfv(GL_LIGHT1, GL_SHININESS, &lightShininess);

The Scene is not lit as expected from 2 lights.

Original issue reported on code.google.com by saptarsh...@gmail.com on 14 May 2009 at 7:23