3 using SiliconStudio.Core;
4 using SiliconStudio.Core.Mathematics;
5 using SiliconStudio.Paradox.Graphics;
6 using SiliconStudio.Paradox.UI.Controls;
8 namespace SiliconStudio.
Paradox.UI.Renderers
13 internal class DefaultModalElementRenderer : ElementRenderer
15 private Matrix identity = Matrix.Identity;
24 public override void Load()
31 public override void Unload()
35 noStencilNoDepth.Dispose();
38 public override void RenderColor(UIElement element, UIRenderingContext context)
45 var uiResolution =
new Vector3(Resolution.X, Resolution.Y, 0);
46 Batch.Begin(ref UI.ViewProjectionInternal, GraphicsDevice.BlendStates.AlphaBlend, noStencilNoDepth, 0);
47 Batch.DrawRectangle(ref identity, ref uiResolution, ref modalElement.OverlayColorInternal, context.DepthBias);
51 Batch.Begin(ref UI.ViewProjectionInternal, GraphicsDevice.BlendStates.AlphaBlend, KeepStencilValueState, context.StencilTestReferenceValue);
53 context.DepthBias += 1;
55 base.RenderColor(element, context);
Contains depth-stencil state for the device.
Represents a modal element that puts an overlay upon the underneath elements and freeze their input...
A service registry is a IServiceProvider that provides methods to register and unregister services...
Performs primitive-based rendering, creates resources, handles system-level variables, adjusts gamma ramp levels, and creates shaders. See The+GraphicsDevice+class to learn more about the class.
Describes a depth stencil state.
SiliconStudio.Core.Mathematics.Vector3 Vector3
Represents a 4x4 mathematical matrix.