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 godecho
1
 
        glEnableClientState(GL_COLOR_ARRAY);
        glEnableClientState(GL_VERTEX_ARRAY);

        GLint tempa[] = {0, 0, 512, 512, 0, 512};
        GLfloat tempb[] = {    .5, .5, .5, 1, .5, .5, .5, 1, .5, .5, .5, 1, 
                            .5, .5, .5, 1, .5, .5, .5, 1, .5, .5, .5, 1, 
                            .5, .5, .5, 1, .5, .5, .5, 1, .5, .5, .5, 1    };
        
        glVertexPointer    (2, GL_INT,        0, tempa);
        glColorPointer    (4, GL_FLOAT,    0, tempb);
        
        
        glDrawArrays(GL_TRIANGLES, 0, 1);

        glDisableClientState(GL_COLOR_ARRAY);
        glDisableClientState(GL_VERTEX_ARRAY);