mirror of
https://github.com/KillzXGaming/Switch-Toolbox
synced 2024-11-23 13:03:15 +00:00
24 lines
557 B
C#
24 lines
557 B
C#
using OpenTK;
|
|
using OpenTK.Graphics.OpenGL;
|
|
|
|
namespace FirstPlugin
|
|
{
|
|
public class DepthGLControl
|
|
{
|
|
public DepthFunction DepthFunction = DepthFunction.Lequal;
|
|
|
|
public bool EnableTest{ get; set; }
|
|
public bool EnableWrite { get; set; }
|
|
|
|
public void LoadRenderPass()
|
|
{
|
|
if (EnableTest)
|
|
GL.Enable(EnableCap.DepthTest);
|
|
else
|
|
GL.Disable(EnableCap.DepthTest);
|
|
|
|
GL.DepthFunc(DepthFunction);
|
|
GL.DepthMask(EnableWrite);
|
|
}
|
|
}
|
|
}
|