Did you setup projective matrix and viewport?
VBO is just buffer for vertices. Vertices are stored in server area (GPU).
glGenBuffers(1, &vboID);
glBindBuffer(GL_ARRAY_BUFFER, vboID);
glBufferData(GL_ARRAY_BUFFER, 24 * 3 * sizeof(float), vertices, GL_STATIC_DRAW);
glGenBuffers(1, &vboID);
glBindBuffer(GL_ARRAY_BUFFER, vboID);
glBufferData(GL_ARRAY_BUFFER, 24 * 3 * sizeof(float), vertices, GL_STATIC_DRAW);
To copy to clipboard, switch view to plain text mode
When you have bind VBO object then glVertexPointer (and others glColorPointer...) take their data from VBO. The last parameter (pointer to vertices) indicates offset in the binded VBO object. Now, you can store vertices, normals, colors in separate VBO objects, or all together in one VBO object. It's up to you.
Bookmarks