Show More
Commit Description:
Fix syntax error.
Commit Description:
Fix syntax error.
File last commit:
Show/Diff file:
Action:
FNA/src/Graphics/States/RasterizerState.cs
141 lines | 2.2 KiB | text/x-csharp | CSharpLexer
Early working version (including all dependencies, lol).
r0 #region License
/* FNA - XNA4 Reimplementation for Desktop Platforms
Upgrade FNA to 22.12...
r690 * Copyright 2009-2022 Ethan Lee and the MonoGame Team
Early working version (including all dependencies, lol).
r0 *
* 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
{
Upgrade FNA to 22.12...
r690 get
{
return state.cullMode;
}
set
{
state.cullMode = value;
}
Early working version (including all dependencies, lol).
r0 }
public float DepthBias
{
Upgrade FNA to 22.12...
r690 get
{
return state.depthBias;
}
set
{
state.depthBias = value;
}
Early working version (including all dependencies, lol).
r0 }
public FillMode FillMode
{
Upgrade FNA to 22.12...
r690 get
{
return state.fillMode;
}
set
{
state.fillMode = value;
}
Early working version (including all dependencies, lol).
r0 }
public bool MultiSampleAntiAlias
{
Upgrade FNA to 22.12...
r690 get
{
return state.multiSampleAntiAlias == 1;
}
set
{
state.multiSampleAntiAlias = (byte) (value ? 1 : 0);
}
Early working version (including all dependencies, lol).
r0 }
public bool ScissorTestEnable
{
Upgrade FNA to 22.12...
r690 get
{
return state.scissorTestEnable == 1;
}
set
{
state.scissorTestEnable = (byte) (value ? 1 : 0);
}
Early working version (including all dependencies, lol).
r0 }
public float SlopeScaleDepthBias
{
Upgrade FNA to 22.12...
r690 get
{
return state.slopeScaleDepthBias;
}
set
{
state.slopeScaleDepthBias = value;
}
Early working version (including all dependencies, lol).
r0 }
#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
Upgrade FNA to 22.12...
r690 #region Internal FNA3D Variables
internal FNA3D.FNA3D_RasterizerState state;
#endregion
Early working version (including all dependencies, lol).
r0 #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
}
}