Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
RasterizerStateFactory.cs
Go to the documentation of this file.
1 // Copyright (c) 2014 Silicon Studio Corp. (http://siliconstudio.co.jp)
2 // This file is distributed under GPL v3. See LICENSE.md for details.
3 using SiliconStudio.Core;
4 
5 namespace SiliconStudio.Paradox.Graphics
6 {
7  /// <summary>
8  /// Base factory for <see cref="RasterizerState"/>.
9  /// </summary>
11  {
12  /// <summary>
13  /// Initializes a new instance of the <see cref="RasterizerStateFactory"/> class.
14  /// </summary>
15  /// <param name="device">The device.</param>
16  internal RasterizerStateFactory(GraphicsDevice device) : base(device)
17  {
18  CullFront = RasterizerState.New(device, new RasterizerStateDescription(CullMode.Front)).KeepAliveBy(this);
19  CullFront.Name = "RasterizerState.CullClockwise";
20 
21  CullBack = RasterizerState.New(device, new RasterizerStateDescription(CullMode.Back)).KeepAliveBy(this);
22  CullBack.Name = "RasterizerState.CullCounterClockwiseFace";
23 
24  CullNone = RasterizerState.New(device, new RasterizerStateDescription(CullMode.None)).KeepAliveBy(this);
25  CullNone.Name = "RasterizerState.CullNone";
26  }
27 
28  /// <summary>
29  /// Built-in raterizer state object with settings for culling primitives with clockwise winding order.
30  /// </summary>
31  public readonly RasterizerState CullFront;
32 
33  /// <summary>
34  /// Built-in raterizer state object with settings for culling primitives with counter-clockwise winding order.
35  /// </summary>
36  public readonly RasterizerState CullBack;
37 
38  /// <summary>
39  /// Built-in raterizer state object with settings for not culling any primitives.
40  /// </summary>
41  public readonly RasterizerState CullNone;
42  }
43 }
44 
readonly RasterizerState CullBack
Built-in raterizer state object with settings for culling primitives with counter-clockwise winding o...
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.
CullMode
Indicates triangles facing a particular direction are not drawn.
Definition: CullMode.cs:14
readonly RasterizerState CullFront
Built-in raterizer state object with settings for culling primitives with clockwise winding order...
readonly RasterizerState CullNone
Built-in raterizer state object with settings for not culling any primitives.