Original Post
In order to learn how to use VBOs, I'm currently trying to make vertex array work. And they don't :-( Not all the polygons are rendered (more or less half of them aren't), but I know that both vertices and faces are correct (if I try to render using immediate mode, everything works). Is there some common mistake that beginners usually make and that can lead to this errot? Don't know if you need code, but anyway: Thank you!
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glTranslatef(pos[0], pos[1], pos[2]);
glRotatef(rot_angle, rot_axis[0], rot_axis[1], rot_axis[2]);
glColor3f(1.0,1.0,1.0);
//Declares the vertex arrays
glEnableClientState(GL_VERTEX_ARRAY);
glVertexPointer(3, GL_FLOAT, 0, vertices);
if(normals)
{
glEnableClientState(GL_NORMAL_ARRAY);
glNormalPointer(GL_FLOAT, 0, normals);
}
else glDisableClientState(GL_NORMAL_ARRAY);
//Draw the geometry
glDrawElements(GL_TRIANGLES, nfaces, GL_UNSIGNED_SHORT, faces);