hi guys! i try to rendenr a simple cube using VBO but when i render it i see a cube without a triangle in all the faces(just 1 triangle x face) here is the code that i use
for init
------8<----code----------8<-------------------------------------
unsigned int modelPointsBufferID;
GLfloat verticesCube[] = {100,100,100, -100,100,100, -100,-100,100, 100,-100,100, // v0-v1-v2-v3
100,100,100, 100,-100,100, 100,-100,-100, 100,100,-100, // v0-v3-v4-v5
100,100,100, 100,100,-100, -100,100,-100, -100,100,100, // v0-v5-v6-v1
-100,100,100, -100,100,-100, -100,-100,-100, -100,-100,100, // v1-v6-v7-v2
-100,-100,-100, 100,-100,-100, 100,-100,100, -100,-100,100, // v7-v4-v3-v2
100,-100,-100, -100,-100,-100, -100,100,-100, 100,100,-100}; // v4-v7-v6-v5
int allocationSize = sizeof(verticesCube);
glGenBuffersARB(1, &modelPointsBufferID);
glBindBufferARB(GL_ARRAY_BUFFER_ARB, modelPointsBufferID);
glBufferDataARB(GL_ARRAY_BUFFER_ARB, sizeof(verticesCube), verticesCube, GL_STATIC_DRAW_ARB);
------8<----code----------8<-------------------------------------
And when i draw
------8<----Render code--------8<-------------------------------
glBindBufferARB(GL_ARRAY_BUFFER_ARB, modelPointsBufferID);
glEnableClientState(GL_VERTEX_ARRAY);
glVertexPointer(3, GL_FLOAT, 0, 0);
glDrawArrays(GL_TRIANGLES, 0, 24);
glDisableClientState(GL_VERTEX_ARRAY);
glBindBufferARB(GL_ARRAY_BUFFER_ARB, 0);
------8<----Render code--------8<-------------------------------
i can’t figure out what happend thanks in advance to any help!!