fna-workbench

fna-workbench Git Source Tree


Root/src/Graphics/States/RasterizerState.cs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
#region License
/* FNA - XNA4 Reimplementation for Desktop Platforms
 * Copyright 2009-2016 Ethan Lee and the MonoGame Team
 *
 * Released under the Microsoft Public License.
 * See LICENSE for details.
 */
#endregion
 
namespace Microsoft.Xna.Framework.Graphics
{
    public class RasterizerState : GraphicsResource
    {
        #region Public Properties
 
        public CullMode CullMode
        {
            get;
            set;
        }
 
        public float DepthBias
        {
            get;
            set;
        }
 
        public FillMode FillMode
        {
            get;
            set;
        }
 
        public bool MultiSampleAntiAlias
        {
            get;
            set;
        }
 
        public bool ScissorTestEnable
        {
            get;
            set;
        }
 
        public float SlopeScaleDepthBias
        {
            get;
            set;
        }
 
        #endregion
 
        #region Public RasterizerState Presets
 
        public static readonly RasterizerState CullClockwise = new RasterizerState(
            "RasterizerState.CullClockwise",
            CullMode.CullClockwiseFace
        );
 
        public static readonly RasterizerState CullCounterClockwise = new RasterizerState(
            "RasterizerState.CullCounterClockwise",
            CullMode.CullCounterClockwiseFace
        );
 
        public static readonly RasterizerState CullNone = new RasterizerState(
            "RasterizerState.CullNone",
            CullMode.None
        );
 
        #endregion
 
        #region Public Constructor
 
        public RasterizerState()
        {
            CullMode = CullMode.CullCounterClockwiseFace;
            FillMode = FillMode.Solid;
            DepthBias = 0;
            MultiSampleAntiAlias = true;
            ScissorTestEnable = false;
            SlopeScaleDepthBias = 0;
        }
 
        #endregion
 
        #region Private Constructor
 
        private RasterizerState(
            string name,
            CullMode cullMode
        ) : this() {
            Name = name;
            CullMode = cullMode;
        }
 
        #endregion
    }
}

Archive Download this file

Branches

Number of commits:
Page rendered in 0.08373s using 11 queries.