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 SetRasterizerConfiguration(RasterizerConfiguration config) { if (config != _currentRasterizerConfiguration) { _currentRasterizerConfiguration = config; // Console.WriteLine("Set Rasterizer Configuration: " + config); switch (config) { case RasterizerConfiguration.FillFront: _deviceContext.Rasterizer.State = _renderStates.RasterizerFillFront; break; case RasterizerConfiguration.FillBack: _deviceContext.Rasterizer.State = _renderStates.RasterizerFillBack; break; case RasterizerConfiguration.FillFrontBack: _deviceContext.Rasterizer.State = _renderStates.RasterizerFillFrontBack; break; case RasterizerConfiguration.WireFront: _deviceContext.Rasterizer.State = _renderStates.RasterizerWireFront; break; case RasterizerConfiguration.WireBack: _deviceContext.Rasterizer.State = _renderStates.RasterizerWireBack; break; case RasterizerConfiguration.WireFrontBack: _deviceContext.Rasterizer.State = _renderStates.RasterizerWireFrontBack; break; default: throw new ArgumentException($"Unknown Rasterizer Configuration '{config}'"); } } }