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


odd blending bug by baldurk
    glDisable(GL_DEPTH_TEST);

    glEnable(GL_BLEND);

    glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
    glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
    Render();

    glBlendFunc(GL_ZERO, GL_SRC_ALPHA);
    glColor4f(0.0f, 0.0f, 0.0f, 0.99f);

    glLoadIdentity();
    glBegin(GL_QUADS);
    glVertex3f(-10.0f, -10.0f, -1.0f);
    glVertex3f(-10.0f,  10.0f, -1.0f);
    glVertex3f( 10.0f,  10.0f, -1.0f);
    glVertex3f( 10.0f, -10.0f, -1.0f);
    glEnd();