protected override void LoadContent() { var gltfFactory = new MonoScene.Graphics.Pipeline.GltfModelFactory(this.GraphicsDevice); _AvodadoTemplate = gltfFactory.LoadModel("Content\\Avocado.glb"); _BrainStemTemplate = gltfFactory.LoadModel("Content\\BrainStem.glb"); _CesiumManTemplate = gltfFactory.LoadModel("Content\\CesiumMan.glb"); _HauntedHouseTemplate = gltfFactory.LoadModel("Content\\haunted_house.glb"); _SharkTemplate = gltfFactory.LoadModel("Content\\shark.glb"); }
public static DeviceModelCollection ConvertToDevice(Assimp.Scene srcScene, DeviceMeshFactory meshFactory) { if (meshFactory == null) { throw new ArgumentNullException(); } var content = ConvertToContent(srcScene); return(DeviceModelCollection.CreateFrom(content, meshFactory.CreateMeshCollection)); }
public DeviceModelCollection ConvertToDevice(SharpGLTF.Schema2.ModelRoot srcModel, DeviceMeshFactory meshFactory) { if (meshFactory == null) { throw new ArgumentNullException(); } var content = ConvertToContent(srcModel); return(DeviceModelCollection.CreateFrom(content, meshFactory.CreateMeshCollection)); }
protected override void UnloadContent() { _AvodadoTemplate?.Dispose(); _AvodadoTemplate = null; _BrainStemTemplate?.Dispose(); _BrainStemTemplate = null; _CesiumManTemplate?.Dispose(); _CesiumManTemplate = null; _HauntedHouseTemplate?.Dispose(); _HauntedHouseTemplate = null; _SharkTemplate?.Dispose(); _SharkTemplate = null; }