From 3007729693cdbc7861c49996a1fda3120afc1c25 Mon Sep 17 00:00:00 2001 From: Christopher Whitley <103014489+AristurtleDev@users.noreply.github.com> Date: Wed, 25 Mar 2026 23:26:42 -0400 Subject: [PATCH] Expose rasterizer state property --- src/Forme.MonoGame/FormeRenderer.cs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) 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;