C++ graphics from vector to 2D/3D OpenGL