I know basics of VBO’s, right now i am rendering my game blocks with VBO, and i am using only vertex array and texture coord array. Right now i am trying to add colors array to VBO, but i am failing in here. Maybe somebody can edit this part of code:
...........
glEnableClientState(GL_VERTEX_ARRAY);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
glEnableClientState(GL11.GL_COLOR_ARRAY);
glBindBuffer(GL_ARRAY_BUFFER, vboVertexID);
glVertexPointer(2, GL_FLOAT, 7 << 2, 0);
glTexCoordPointer(2, GL_FLOAT, 7 << 2, 2 << 2);
GL11.glColorPointer(3, GL_FLOAT, 7 << 3,4 << 3);
glBindTexture(GL_TEXTURE_2D, Main.texture.id);
glDrawArrays(GL_QUADS, 0, 20*16*16);
...........
I want to use colors, please help me.