Changeset 1480


Ignore:
Timestamp:
Jun 15, 2012, 2:40:48 PM (8 years ago)
Author:
sam
Message:

gpu: better state restoration after vertex buffer usage.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gpu/vertexbuffer.cpp

    r1478 r1480  
    148148    glEnable(GL_CULL_FACE);
    149149#   if defined HAVE_GL_2X && !defined __APPLE__
     150    /* FIXME: this has nothing to do here! */
    150151    glEnable(GL_ALPHA_TEST);
    151152    glAlphaFunc(GL_GEQUAL, 0.01f);
     
    163164        break;
    164165    }
     166#   if defined HAVE_GL_2X && !defined __APPLE__
     167    /* FIXME: this has nothing to do here! */
     168    glDisable(GL_ALPHA_TEST);
     169#   endif
    165170#endif
    166171}
     
    191196#else
    192197#   if defined HAVE_GL_2X && !defined __APPLE__
     198    /* FIXME: this has nothing to do here! */
    193199    glEnable(GL_ALPHA_TEST);
    194200    glAlphaFunc(GL_GEQUAL, 0.01f);
     
    208214        break;
    209215    }
     216#   if defined HAVE_GL_2X && !defined __APPLE__
     217    /* FIXME: this has nothing to do here! */
     218    glDisable(GL_ALPHA_TEST);
     219#   endif
    210220#endif
    211221}
     
    230240    for (int i = 0; i < 12; i++)
    231241        glDisableVertexAttribArray(i);
     242    glBindBuffer(GL_ARRAY_BUFFER, 0);
    232243    /* FIXME: only useful for VAOs */
    233244    //glBindBuffer(GL_ARRAY_BUFFER, 0);
Note: See TracChangeset for help on using the changeset viewer.