some functions are now in 3D and glmMeshes are passed by reference