mirror of
https://github.com/KillzXGaming/Switch-Toolbox
synced 2024-11-23 21:13:19 +00:00
25 lines
557 B
C#
25 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);
|
|||
|
}
|
|||
|
}
|
|||
|
}
|