@Chuck
Well, it does lack some obvious stuff. And that is the fact that I am assuming I won't reuse the same vertices, since I am creating the indexes on the fly. Also I have this feeling that I am missing something, but can't put my tongue on it. But anyways, this was my first attempt at creating a VAO, and I am going to create a basic framework or whatever you want to call it, to abstract out most of the heavy operations of vao's and vbo's.