Example #1
0
BasicMesh* MeshFactory::LoadMeshObjectFromFile( const std::string& filepath,
												  U32 load_option_flags,
												  MeshType::Name mesh_type )
{
	BasicMesh* pMesh = InitMeshInstance( mesh_type, load_option_flags );

	bool loaded = pMesh->LoadFromFile( filepath, load_option_flags );

	if( loaded )
		return pMesh;
	else
	{
		SafeDelete( pMesh );
		return NULL;
	}
}