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


A Paste by Anonymous
    glDisable(GL_LIGHTING);
    glActiveTextureARB(GL_TEXTURE0_ARB);    
    Bind();    
    glEnable(GL_TEXTURE_2D);    
    glEnable(GL_BLEND);
    glBlendFunc(GL_SRC_ALPHA, GL_ONE);
    glEnableClientState(GL_COLOR_ARRAY);
    glColorPointer(4, GL_UNSIGNED_BYTE, 0, light);
    glEnableClientState(GL_VERTEX_ARRAY);    
    glVertexPointer(3, GL_FLOAT, 0, vertex);

    glLockArraysEXT(0, index);
glDrawElements(GL_TRIANGLE_STRIP,index,GL_UNSIGNED_INT,&index[0]);
    glUnlockArraysEXT();
    glDisableClientState(GL_VERTEX_ARRAY);    
    glDisableClientState(GL_COLOR_ARRAY);
    glDisable(GL_TEXTURE_2D);
    glDisable( GL_BLEND );
    glBindTexture(GL_TEXTURE_2D, 0);
    glActiveTextureARB(GL_TEXTURE0_ARB);
    glEnable(GL_LIGHTING);