Original Post
Quick question. Like most people I have various arrays that I create and send to OpenGL, such as: Vector3* m_verts; m_verts = new Vector3[m_numverts]; glVertexPointer(3, GL_FLOAT, VECTOR3_STRIDE, (float*)m_verts); delete [] m_verts; And so on. (Obviously not that code in that sequence, but those are the different things you would do with the array.) I have always assumed that it would be impossible to use std::vectors in this case because a) perhaps the internal vector memory isn't gauranteed to be contiguous and b) there's no easy way to access the internal data of the vector directly. So does anyone use std::vectors in cases like this? Is there a way to do it (safely, and without hacks)?