
Originally Posted by
carsten neumann
Hmm, this is moving off-topic and into how pointers, memory, and object life time in C++ work and I really think you'd make your life easier if you'd review those issues outside of your concrete problem. Graphics programming is to a good extent about managing the memory for your assets.
The front() function for std::vector returns (a reference to) the first element in the vector which you then assign to the local variable verteciesFront. You then pass the address of that local variable to glVertexPointer, which is very different from passing the address of the first element in the vector.