File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -64,6 +64,18 @@ public sealed class FormeRenderer : IDisposable
6464 /// </remarks>
6565 public bool IsDisposed { get ; private set ; }
6666
67+ /// <summary>
68+ /// Gets or sets the <see cref="Microsoft.Xna.Framework.Graphics.RasterizerState"/> applied
69+ /// during the glyph flush in <see cref="End"/>.
70+ /// </summary>
71+ /// <remarks>
72+ /// Defaults to <see cref="RasterizerState.CullNone"/> (no face culling, scissor test
73+ /// disabled). Set this to a state with <c>ScissorTestEnable = true</c> when the caller
74+ /// manages a scissor rect for clipping (e.g. a UI renderer with panel or window clip regions).
75+ /// The value must not be <see langword="null"/>.
76+ /// </remarks>
77+ public RasterizerState RasterizerState { get ; set ; } = RasterizerState . CullNone ;
78+
6779 /// <summary>
6880 /// Initializes a new <see cref="FormeRenderer"/> and loads the embedded Slug shader.
6981 /// </summary>
@@ -317,7 +329,7 @@ public void End()
317329
318330 _graphicsDevice . BlendState = BlendState . AlphaBlend ;
319331 _graphicsDevice . DepthStencilState = DepthStencilState . None ;
320- _graphicsDevice . RasterizerState = RasterizerState . CullNone ;
332+ _graphicsDevice . RasterizerState = RasterizerState ;
321333 _graphicsDevice . SamplerStates [ 0 ] = SamplerState . PointClamp ;
322334 _graphicsDevice . SamplerStates [ 1 ] = SamplerState . PointClamp ;
323335 _graphicsDevice . SamplerStates [ 2 ] = SamplerState . PointClamp ;
You can’t perform that action at this time.
0 commit comments