mirror of
https://github.com/KillzXGaming/Switch-Toolbox
synced 2024-12-30 14:53:09 +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);
|
|||
|
}
|
|||
|
}
|
|||
|
}
|