diff --git a/src/Forme.MonoGame/FormeRenderer.cs b/src/Forme.MonoGame/FormeRenderer.cs index 0c3b5a2..fe1ca92 100644 --- a/src/Forme.MonoGame/FormeRenderer.cs +++ b/src/Forme.MonoGame/FormeRenderer.cs @@ -64,6 +64,18 @@ public sealed class FormeRenderer : IDisposable /// public bool IsDisposed { get; private set; } + /// + /// Gets or sets the applied + /// during the glyph flush in . + /// + /// + /// Defaults to (no face culling, scissor test + /// disabled). Set this to a state with ScissorTestEnable = true when the caller + /// manages a scissor rect for clipping (e.g. a UI renderer with panel or window clip regions). + /// The value must not be . + /// + public RasterizerState RasterizerState { get; set; } = RasterizerState.CullNone; + /// /// Initializes a new and loads the embedded Slug shader. /// @@ -317,7 +329,7 @@ public void End() _graphicsDevice.BlendState = BlendState.AlphaBlend; _graphicsDevice.DepthStencilState = DepthStencilState.None; - _graphicsDevice.RasterizerState = RasterizerState.CullNone; + _graphicsDevice.RasterizerState = RasterizerState; _graphicsDevice.SamplerStates[0] = SamplerState.PointClamp; _graphicsDevice.SamplerStates[1] = SamplerState.PointClamp; _graphicsDevice.SamplerStates[2] = SamplerState.PointClamp;