GLProgramming.com

home :: about :: development guides :: irc :: forums :: search :: paste :: links :: contribute :: code dump

-> Click here to learn how to get live help <-


New Paste :: Recent Pastes:: No Line Numbers


A Paste by Anonymous
1
 
    glEnable(GL_DEPTH_TEST);

    if(fog)
        glEnable(GL_FOG);

    glCullFace(GL_FRONT);

    glDisable(GL_BLEND);

    // Render the main level
    glPushMatrix();
        RenderLevel(vPos,-1);
    glPopMatrix();

    // Render the Dot3 Bump Mapped faces
    glPushMatrix();
        for(j=0;j<num_OfPPLights;j++) {
            if(j>0) {
                glDepthFunc(GL_LEQUAL);
                glBlendFunc(GL_ONE_MINUS_DST_COLOR,GL_ONE);
                glEnable(GL_BLEND);
            } else {
                glDepthFunc(GL_LESS);
                glDisable(GL_BLEND);
            }            

            RenderBump(vPos,j);
            glDepthFunc(GL_LESS);
        }
    glPopMatrix();

    glDisable(GL_BLEND);