Use vector instead dynamic array in communication with OpenGL