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:: Add Line Numbers


culling by skyke
glEnable( GL_CULL_FACE );
    glBegin( GL_QUADS );
        glCullFace( GL_BACK );
        glNormal3f( 0.0 , 0.0, 1.0);
        glVertex3f(0.0,0.0,0.0);
        glVertex3f(1.0,0.0,0.0);
        glVertex3f(1.0,1.0,0.0);
        glVertex3f(0.0,1.0,0.0);
    glEnd();
    glBegin( GL_QUADS );
        glCullFace( GL_FRONT );
        glNormal3f( 0.0 , 0.0, -1.0);
        glVertex3f(0.0,0.0,0.0);
        glVertex3f(1.0,0.0,0.0);
        glVertex3f(1.0,1.0,0.0);
        glVertex3f(0.0,1.0,0.0);
    glEnd();