/// <summary> /// Shut down the state /// </summary> public override void Shutdown() { CompositorManager.Singleton.RemoveAll(); CompositorManager.Singleton.UnloadAll(); CompositorManager.Singleton.Dispose(); CityManager.DisposeAll(); scratchZoneMaterial.Unload(); scratchZoneMaterial.Dispose(); }
private void delPluginSphere(string pluginName) { OgreWindow.Instance.pause(); try { MaterialPtr ptrMat = MaterialManager.Singleton.GetByName(sphereNamePrefix + "_SphereMaterial_" + pluginName); ptrMat.Unload(); MaterialManager.Singleton.Remove(ptrMat.Handle); ptrMat.Dispose(); MeshPtr ptrMesh = MeshManager.Singleton.GetByName(sphereNamePrefix + "_SphereMesh_" + pluginName); ptrMesh.Unload(); MeshManager.Singleton.Remove(ptrMesh.Handle); ptrMesh.Dispose(); OgreWindow.Instance.mSceneMgr.DestroyEntity(sphereNamePrefix + "_SphereEntity_" + pluginName); OgreWindow.Instance.mSceneMgr.DestroySceneNode(sphereNamePrefix + "_SphereSceneNode_" + pluginName); } catch (Exception ex) { log("error deleting plugin sphere: " + ex.ToString()); } OgreWindow.Instance.unpause(); }
public void DisposeCachedMaterials() { plotMaterial.Unload(); plotMaterial.Dispose(); }