23 lines
501 B
C#
23 lines
501 B
C#
|
|
using System.Runtime.InteropServices;
|
||
|
|
|
||
|
|
namespace XCEngine.Rendering
|
||
|
|
{
|
||
|
|
[StructLayout(LayoutKind.Sequential)]
|
||
|
|
public struct DepthState
|
||
|
|
{
|
||
|
|
[MarshalAs(UnmanagedType.I1)]
|
||
|
|
public bool writeEnabled;
|
||
|
|
|
||
|
|
public CompareFunction compareFunction;
|
||
|
|
|
||
|
|
public static DepthState CreateDefault()
|
||
|
|
{
|
||
|
|
return new DepthState
|
||
|
|
{
|
||
|
|
writeEnabled = true,
|
||
|
|
compareFunction = CompareFunction.Less
|
||
|
|
};
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|