Exemple #1
0
        private void Dispose(bool disposing)
        {
            if (_disposed)
            {
                return;
            }

            if (_holdPointer)
            {
                NativeHelper.Dispose(ref _texture);
                NativeHelper.Dispose(ref _view);
            }
            else
            {
                _texture = _view = IntPtr.Zero;
            }

            if (disposing)
            {
                _device.RemoveComponent(this);
            }

            _disposed = true;
            GC.SuppressFinalize(this);
        }
Exemple #2
0
        protected virtual void Dispose(bool disposing)
        {
            if (_disposed)
            {
                return;
            }
            NativeHelper.Dispose(ref _buffer);

            if (disposing)
            {
                _device.RemoveComponent(this);
            }

            _disposed = true;
            GC.SuppressFinalize(this);
        }
Exemple #3
0
        private void Dispose(bool disposing)
        {
            if (_disposed)
            {
                return;
            }
            NativeHelper.Dispose(ref _ptr);

            if (disposing)
            {
                _device.RemoveComponent(this);
            }

            _disposed = true;
            GC.SuppressFinalize(this);
        }
Exemple #4
0
        private void Dispose(bool disposing)
        {
            if (_disposed)
            {
                return;
            }

            if (disposing)
            {
                _pipeline.Dispose();
                _vertexProcessor.Dispose();
                _buffer.Dispose();
                _constant.Dispose();

                _device.RemoveComponent(this);
            }

            _disposed = true;
            GC.SuppressFinalize(this);
        }
Exemple #5
0
        private void Dispose(bool disposing)
        {
            if (_disposed)
            {
                return;
            }
            NativeHelper.Dispose(ref _TexturePtr);
            NativeHelper.Dispose(ref _viewPtrTarget);
            NativeHelper.Dispose(ref _viewPtrResource);

            if (disposing)
            {
                _device.ReleaseRenderTargets -= ReleaseView;
                _device.RebuildRenderTargets -= RebuildView;

                _device.RemoveComponent(this);
            }

            _disposed = true;
            GC.SuppressFinalize(this);
        }
Exemple #6
0
        private void Dispose(bool disposing)
        {
            if (_disposed)
            {
                return;
            }

            NativeHelper.Dispose(ref _vertex);
            NativeHelper.Dispose(ref _geometry);
            NativeHelper.Dispose(ref _pixel);
            NativeHelper.Dispose(ref _signatureBlob);
            NativeHelper.Dispose(ref _blendPtr);

            if (disposing)
            {
                _device.ResolutionChanged -= DeviceBufferResized;
                _device.RemoveComponent(this);
            }

            _disposed = true;
            GC.SuppressFinalize(this);
        }