示例#1
0
        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();
 }
示例#3
0
        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;
            }
        }
示例#4
0
        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();
            }
        }
示例#5
0
        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);
 }
示例#7
0
        protected override void OnDispose()
        {
            if (_meshRenderer != null)
            {
                _meshRenderer.Dispose();
            }

            base.Dispose();
        }
示例#8
0
 public void Dispose()
 {
     if (Disposed)
     {
         return;
     }
     Disposed = true;
     MeshRenderer.Dispose();
     Mesh.Dispose();
 }
示例#9
0
 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);
        }
示例#11
0
        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);
        }
示例#12
0
        /// <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();
        }
示例#13
0
        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);
        }
示例#15
0
 public void Dispose()
 {
     if (Disposed)
     {
         return;
     }
     Disposed = true;
     if (!(Mesh is null))
     {
         Mesh.Dispose();
     }
     MeshRenderer.Dispose();
     DiffuseSampler.Dispose();
 }
示例#16
0
        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);
        }
示例#17
0
        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);
        }
示例#18
0
        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);
        }
示例#19
0
 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();
 }
示例#20
0
        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);
        }