Changed gTextureMap/gIndexMap/vertexMap to pointers instead.