Show More
Commit Description:
Add timers for Simulation and various engines...
Commit Description:
Add timers for Simulation and various engines
Starting to add additional timers for different stages of the process of
updating in order to get more insight into what is slowing it down.
The update takes 9ms, which is much longer than it used to.
Engine-specific timers are coming later.
References:
File last commit:
Show/Diff file:
Action:
FNA/src/Graphics/States/RasterizerState.cs
99 lines | 1.6 KiB | text/x-csharp | CSharpLexer
99 lines | 1.6 KiB | text/x-csharp | CSharpLexer
r0 | #region License | |||
/* FNA - XNA4 Reimplementation for Desktop Platforms | ||||
* Copyright 2009-2020 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 | ||||
} | ||||
} | ||||