예제 #1
0
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         SeeingSharpUtil.DisposeObject(_stream);
     }
 }
예제 #2
0
        /// <summary>
        /// Unloads the resource.
        /// </summary>
        protected override void UnloadResourceInternal(EngineDevice device, ResourceDictionary resources)
        {
            _textureView = SeeingSharpUtil.DisposeObject(_textureView);
            _texture     = SeeingSharpUtil.DisposeObject(_texture);

            _isCubeTexture  = false;
            _isRenderTarget = false;
        }
        /// <summary>
        /// Unloads the resource.
        /// </summary>
        protected internal override void UnloadShader()
        {
            foreach (var actInputLayout in _inputLayouts.Values)
            {
                SeeingSharpUtil.DisposeObject(actInputLayout);
            }
            _inputLayouts.Clear();

            _vertexShader = SeeingSharpUtil.DisposeObject(_vertexShader);
        }
예제 #4
0
        /// <summary>
        /// Unloads all resources.
        /// </summary>
        public void UnloadResources()
        {
            _immediateContext  = SeeingSharpUtil.DisposeObject(_immediateContext);
            _immediateContext3 = SeeingSharpUtil.DisposeObject(_immediateContext3);
            _device1           = SeeingSharpUtil.DisposeObject(_device1);
            _device3           = SeeingSharpUtil.DisposeObject(_device3);

            _creationFlags = D3D11.DeviceCreationFlags.None;
            _featureLevel  = D3D.FeatureLevel.Level_11_0;
        }
예제 #5
0
        /// <inheritdoc />
        public void Dispose()
        {
            SeeingSharpUtil.SafeDispose(ref _uploaderColor);

            foreach (var actDumpResult in _dumpResults)
            {
                SeeingSharpUtil.DisposeObject(actDumpResult);
            }
            _dumpResults.Clear();

            _isDisposed = true;
        }
예제 #6
0
        /// <summary>
        /// Unloads all resources loaded on the given device.
        /// </summary>
        /// <param name="engineDevice">The device for which to unload the resource.</param>
        internal override void UnloadResources(EngineDevice engineDevice)
        {
            var bitmap = _loadedBitmaps[engineDevice.DeviceIndex];

            if (bitmap != null)
            {
                engineDevice.DeregisterDeviceResource(this);

                SeeingSharpUtil.DisposeObject(bitmap);
                _loadedBitmaps[engineDevice.DeviceIndex] = null;
            }
        }
예제 #7
0
        /// <summary>
        /// Unloads all resources loaded on the given device.
        /// </summary>
        /// <param name="engineDevice">The device for which to unload the resource.</param>
        internal override void UnloadResources(EngineDevice engineDevice)
        {
            var actEffect = _loadedEffects[engineDevice.DeviceIndex];

            if (actEffect != null)
            {
                engineDevice.DeregisterDeviceResource(this);

                SeeingSharpUtil.DisposeObject(actEffect);
                _loadedEffects[engineDevice.DeviceIndex] = null;
            }
        }
예제 #8
0
        /// <inheritdoc />
        protected override void UnloadResourceInternal(EngineDevice device, ResourceDictionary resources)
        {
            device.EnsureNotNull(nameof(device));

            for (var loop = 0; loop < _chunkTemplates.Length; loop++)
            {
                SeeingSharpUtil.DisposeObject(_chunkTemplates[loop]);
            }
            _chunkTemplates = new RenderingChunkTemplate[0];

            this.LoadedGeometryTriangleCount       = 0;
            this.LoadedGeometryRenderingChunkCount = 0;
        }
예제 #9
0
 /// <summary>
 /// Unloads all loaded resources.
 /// </summary>
 public void Dispose()
 {
     _deviceEx   = SeeingSharpUtil.DisposeObject(_deviceEx);
     _direct3DEx = SeeingSharpUtil.DisposeObject(_direct3DEx);
 }
예제 #10
0
 /// <summary>
 /// Unloads all resources.
 /// </summary>
 internal void UnloadResources()
 {
     _factory = SeeingSharpUtil.DisposeObject(_factory);
     _adapter = SeeingSharpUtil.DisposeObject(_adapter);
 }
 /// <summary>
 /// Unloads all resources.
 /// </summary>
 public void Dispose()
 {
     _factory = SeeingSharpUtil.DisposeObject(_factory);
 }