protected override void Dispose(bool disposing) { if (disposing) { // Remove effect interpreter/binder entries for ShadowMatrix and ShadowColor. var sceneEffectInterpreter = GraphicsService.EffectInterpreters.OfType <SceneEffectInterpreter>().First(); sceneEffectInterpreter.ParameterDescriptions.Remove("ShadowMatrix"); sceneEffectInterpreter.ParameterDescriptions.Remove("ShadowColor"); var sceneEffectBinder = GraphicsService.EffectBinders.OfType <SceneEffectBinder>().First(); sceneEffectBinder.MatrixBindings.Remove("ShadowMatrix"); sceneEffectBinder.Vector4Bindings.Remove("ShadowColor"); // Unload content. // (When the DudeWithProjectedShadow model was loaded, the effect bindings for ShadowMatrix // and ShadowColor where initialized to use callbacks of this class. The next time a // DudeWithProjectedShadow is loaded via the content manager, it will reuse the same cached // mesh, material and effect bindings. Since this class is being removed, the callbacks are // now invalid and we must make sure that the next time a DudeWithProjectedShadow model is // loaded, a new instance with new effect parameter bindings is created.) ContentManager.Unload(); _animationController.Stop(); _animationController.Recycle(); // IMPORTANT: Dispose scene nodes if they are no longer needed! _scene.Dispose(false); // Disposes current and all descendant nodes. // Dispose renderers. _meshRenderer.Dispose(); } base.Dispose(disposing); }
public void Dispose() { Scene.Dispose(false); _meshRenderer.Dispose(); _wboitRenderBlendState.Dispose(); _wboitCombineBlendState.Dispose(); }
protected virtual void Dispose(bool disposing) { if (!IsDisposed) { if (disposing) { // Dispose managed resources. SpriteBatch.Dispose(); MeshRenderer.Dispose(); _decalRenderer.Dispose(); AlphaBlendSceneRenderer.Dispose(); _cloudMapRenderer.Dispose(); _waterWavesRenderer.Dispose(); _sceneCaptureRenderer.Dispose(); _planarReflectionRenderer.Dispose(); _shadowMapRenderer.Dispose(); _shadowMaskRenderer.Dispose(); LightBufferRenderer.Dispose(); _lensFlareRenderer.Dispose(); _skyRenderer.Dispose(); _fogRenderer.Dispose(); _internalDebugRenderer.Dispose(); Scene.Dispose(false); PostProcessors.Dispose(); DebugRenderer.Dispose(); } // Release unmanaged resources. IsDisposed = true; } }
public void Dispose() { if (!disposed) { disposed = true; Background.Dispose(); CompressToSwap.Dispose(); SphereRenderer.Dispose(); CapsuleRenderer.Dispose(); BoxRenderer.Dispose(); TriangleRenderer.Dispose(); MeshRenderer.Dispose(); UILineRenderer.Dispose(); GlyphRenderer.Dispose(); dsv.Dispose(); depthBuffer.Dispose(); rtv.Dispose(); colorBuffer.Dispose(); resolvedSRV.Dispose(); resolvedRTV.Dispose(); resolvedColorBuffer.Dispose(); rasterizerState.Dispose(); opaqueDepthState.Dispose(); opaqueBlendState.Dispose(); a2cBlendState.Dispose(); uiDepthState.Dispose(); uiBlendState.Dispose(); Shapes.Dispose(); } }
protected override void DoDispose() { Background.Dispose(); CompressToSwap.Dispose(); Lines.Dispose(); SphereRenderer.Dispose(); CapsuleRenderer.Dispose(); CylinderRenderer.Dispose(); BoxRenderer.Dispose(); TriangleRenderer.Dispose(); MeshRenderer.Dispose(); UILineRenderer.Dispose(); GlyphRenderer.Dispose(); GL.DeleteFramebuffer(framebuffer); GL.DeleteTexture(depthBuffer); GL.DeleteTexture(colorBuffer); GL.DeleteFramebuffer(resolvedFramebuffer); GL.DeleteTexture(resolvedColorBuffer); Shapes.Dispose(); }
public void Dispose() { _spriteBatch.Dispose(); _meshRenderer.Dispose(); _billboardRenderer.Dispose(); DebugRenderer2D.Dispose(); DebugRenderer.Dispose(); Scene.Dispose(false); }
protected override void OnDispose() { if (_meshRenderer != null) { _meshRenderer.Dispose(); } base.Dispose(); }
public void Dispose() { if (Disposed) { return; } Disposed = true; MeshRenderer.Dispose(); Mesh.Dispose(); }
public void Dispose() { iblEnvironment.Dispose(); backdrop.Dispose(); floor.Dispose(); renderModelRenderer.Dispose(); primitiveRenderer.Dispose(); actor.Dispose(); menu.Dispose(); }
protected override void Dispose(bool disposing) { if (disposing) { _scene.Dispose(false); _meshRenderer.Dispose(); _avatarRenderer.Dispose(); } base.Dispose(disposing); }
protected override void Dispose(bool disposing) { if (disposing) { // IMPORTANT: Dispose scene nodes if they are no longer needed! _scene.Dispose(false); // Disposes current and all descendant nodes. _meshRenderer.Dispose(); } base.Dispose(disposing); }
/// <summary> /// Releases unmanaged and - optionally - managed resources. /// </summary> public void Dispose() { _spriteBatch.Dispose(); _meshRenderer.Dispose(); _skyRenderer.Dispose(); _billboardRenderer.Dispose(); _movingMeshes.Clear(); Scene.Dispose(false); PostProcessors.Dispose(); DebugRenderer.Dispose(); }
protected override void Dispose(bool disposing) { if (disposing) { _renderer.Dispose(); _debugRenderer.Dispose(); _scene.Dispose(false); _proxyNode.Node.Dispose(false); } base.Dispose(disposing); }
protected override void Dispose(bool disposing) { if (disposing) { GameObjectService.Objects.Remove(_cameraObject); _scene.Dispose(false); _meshRenderer.Dispose(); _avatarRenderer.Dispose(); } base.Dispose(disposing); }
public void Dispose() { if (Disposed) { return; } Disposed = true; if (!(Mesh is null)) { Mesh.Dispose(); } MeshRenderer.Dispose(); DiffuseSampler.Dispose(); }
protected override void Dispose(bool disposing) { if (disposing) { GameObjectService.Objects.Remove(_cameraObject); GraphicsService.Screens.Remove(_delegateGraphicsScreen); // IMPORTANT: Dispose scene nodes if they are no longer needed! _scene.Dispose(false); // Disposes current and all descendant nodes. _meshRenderer.Dispose(); } base.Dispose(disposing); }
protected override void Dispose(bool disposing) { if (disposing) { GameObjectService.Objects.Remove(_cameraObject); GraphicsService.Screens.Remove(_delegateGraphicsScreen); // IMPORTANT: Always dispose scene nodes if they are no longer needed! _model.Dispose(false); // Note: This statement disposes only our local clone. // The original instance is still available in the // ContentManager. _meshRenderer.Dispose(); _debugRenderer.Dispose(); } base.Dispose(disposing); }
protected override void Dispose(bool disposing) { if (disposing) { _animationController0.Stop(); _animationController0.Recycle(); _animationController1.Stop(); _animationController1.Recycle(); // IMPORTANT: Dispose scene nodes if they are no longer needed! _scene.Dispose(false); // Disposes current and all descendant nodes. _meshRenderer.Dispose(); _debugRenderer.Dispose(); } base.Dispose(disposing); }
public void Dispose() { _spriteBatch.Dispose(); _meshRenderer.Dispose(); _decalRenderer.Dispose(); _billboardRenderer.Dispose(); AlphaBlendSceneRenderer.Dispose(); _shadowMapRenderer.Dispose(); _shadowMaskRenderer.Dispose(); LightBufferRenderer.Dispose(); _lensFlareRenderer.Dispose(); _skyRenderer.Dispose(); _fogRenderer.Dispose(); _internalDebugRenderer.Dispose(); Scene.Dispose(false); PostProcessors.Dispose(); DebugRenderer.Dispose(); }
protected override void Dispose(bool disposing) { if (disposing) { // IMPORTANT: Always dispose scene nodes if they are no longer needed! _model.Dispose(false); // Note: This statement disposes only our local clone. // The original instance is still available in the // ContentManager. _meshRenderer.Dispose(); _debugRenderer.Dispose(); // Unload content. // (We have changed the properties of some loaded materials. Other samples // should use the default values. When we unload them now, the next sample // will reload them with default values.) ContentManager.Unload(); } base.Dispose(disposing); }