29 lines
730 B
C#
29 lines
730 B
C#
|
|
using System.Runtime.InteropServices;
|
||
|
|
|
||
|
|
namespace XCEngine.Rendering
|
||
|
|
{
|
||
|
|
[StructLayout(LayoutKind.Sequential)]
|
||
|
|
public struct StencilState
|
||
|
|
{
|
||
|
|
[MarshalAs(UnmanagedType.I1)]
|
||
|
|
public bool enabled;
|
||
|
|
|
||
|
|
public byte readMask;
|
||
|
|
public byte writeMask;
|
||
|
|
public StencilFaceState frontFace;
|
||
|
|
public StencilFaceState backFace;
|
||
|
|
|
||
|
|
public static StencilState CreateDefault()
|
||
|
|
{
|
||
|
|
return new StencilState
|
||
|
|
{
|
||
|
|
enabled = false,
|
||
|
|
readMask = 0xFF,
|
||
|
|
writeMask = 0xFF,
|
||
|
|
frontFace = StencilFaceState.CreateDefault(),
|
||
|
|
backFace = StencilFaceState.CreateDefault()
|
||
|
|
};
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|