protected override void Dispose(bool disposing) { if (disposing) { SeeingSharpUtil.DisposeObject(_stream); } }
/// <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); }
/// <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; }
/// <inheritdoc /> public void Dispose() { SeeingSharpUtil.SafeDispose(ref _uploaderColor); foreach (var actDumpResult in _dumpResults) { SeeingSharpUtil.DisposeObject(actDumpResult); } _dumpResults.Clear(); _isDisposed = true; }
/// <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; } }
/// <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; } }
/// <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; }
/// <summary> /// Unloads all loaded resources. /// </summary> public void Dispose() { _deviceEx = SeeingSharpUtil.DisposeObject(_deviceEx); _direct3DEx = SeeingSharpUtil.DisposeObject(_direct3DEx); }
/// <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); }