Finally got a 3D cube to be rendered. While doing it, fixed a bug in MeshFactory that caused it to allocate the incorrect amount of memory for each mesh.