   Working with arrays in VBO's
  Hey guys,Im having a play with VBO's and vertex and colour arrays but i'm running into a little problem with the colour aspect of things.I'm trying to draw a cube that has each face with a differernt colour but insted the front and back panels of the cube are one solid colour and every Panel between is blending the two front and back panels and i'm pretty sure this has got something to do with the way iv'e set the arrays up.Iv'e had a look at some tutoials but most of them dont focus so much of the colour aspect of things and (so far) all them them just draw a 1 colour object(At this stage im only Drawing half the cube)Heres the Rendering Function and Variable Definitions:[source lang = cpp]#define VERTEX_DATA   0#define COLOUR_DATA   1//Verts = XYZ    TOP LEFT  TOP RIGHT  BOT RIT   BOT LEFTfloat Verticies[] = { -5, 5, 5,  5, 5, 5,  5,-5, 5, -5,-5, 5,  //Front Face  -5, 5,-5,  5, 5,-5,  5,-5,-5, -5,-5,-5,};//BackFace//Colours = RGBAfloat Colours[] = {1.0, 0.0, 0.0, 0.0, //RED    1.0, 0.0, 0.0, 0.0,    1.0, 0.0, 0.0, 0.0,    1.0, 0.0, 0.0, 0.0,    0.0, 1.0, 0.0, 0.0,//GREEN    0.0, 1.0, 0.0, 0.0,    0.0, 1.0, 0.0, 0.0,    0.0, 1.0, 0.0, 0.0,    0.0, 0.0, 1.0, 0.0,//BLUE    0.0, 0.0, 1.0, 0.0,    0.0, 0.0, 1.0, 0.0,    0.0, 0.0, 1.0, 0.0};unsigned short int Index[] ={0, 1, 2, 3, //FRONT FACE 0, 4, 7, 3, //SIDE FACE 4, 5, 6, 7};//BACK FACEvoid Render(void){glClear(GL_COLOR_BUFFER_BIT);  //Clear The buffergluLookAt(30.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0 );//VBO STUFFglEnableClientState(GL_VERTEX_ARRAY);glEnableClientState(GL_COLOR_ARRAY);glBindBuffer(GL_COLOR_ARRAY, COLOUR_DATA);glColorPointer(4, GL_FLOAT, 0, Colours);glBindBuffer(GL_ARRAY_BUFFER, VERTEX_DATA);glVertexPointer(3, GL_FLOAT,0, Verticies);glDrawElements(GL_QUADS, 12, GL_UNSIGNED_SHORT, Index);glDisableClientState(GL_COLOR_ARRAY);glDisableClientState(GL_VERTEX_ARRAY);glutSwapBuffers();}
  You can't share vertices and expect them to contain different values. You need to create independent vertices for each face.   ;  Cool, Cheers for the answer.   