protected void ResetToUninitializedState() { _currentDepthConfiguration = DepthConfiguration.Uninitialized; _currentRasterizerConfiguration = RasterizerConfiguration.Uninitialized; _currentDepthStencilView = null; for (var i = 0; i < _currentRenderTargetViews.Length; i++) { _currentRenderTargetViews[i] = null; _preallocatedRtvArray[i] = null; } _currentViewportRect = RectangleF.Empty; }
public void SetDepthConfiguration(DepthConfiguration config) { if (config != _currentDepthConfiguration) { _currentDepthConfiguration = config; // Console.WriteLine("Set Depth Configuration: " + config); switch (config) { case DepthConfiguration.Disabled: _deviceContext.OutputMerger.DepthStencilState = _renderStates.DepthDisable; break; case DepthConfiguration.Enabled: _deviceContext.OutputMerger.DepthStencilState = _renderStates.DepthEnable; break; default: throw new ArgumentException($"Unknown Depth Configuration '{config}'"); } } }