3 using SiliconStudio.Core.ReferenceCounting;
4 using SiliconStudio.Core.Serialization.Contents;
6 namespace SiliconStudio.
Paradox.Graphics
8 [ContentSerializer(typeof(RasterizerStateSerializer))]
19 Description = description;
35 lock (graphicsDevice.CachedRasterizerStates)
37 if (graphicsDevice.CachedRasterizerStates.TryGetValue(rasterizerStateDescription, out rasterizerState))
40 rasterizerState.AddReferenceInternal();
44 rasterizerState =
new RasterizerState(graphicsDevice, rasterizerStateDescription);
45 graphicsDevice.CachedRasterizerStates.Add(rasterizerStateDescription, rasterizerState);
48 return rasterizerState;
55 GraphicsDevice.CachedRasterizerStates.Remove(Description);
Describes a rasterizer state.
override void Destroy()
Disposes of object resources.
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.
readonly RasterizerStateDescription Description
Gets the rasterizer state description.
static RasterizerState New(GraphicsDevice graphicsDevice, RasterizerStateDescription rasterizerStateDescription)
Initializes a new instance of the IRasterizerState class.
RasterizerState(RasterizerStateDescription description)