mirror of
https://github.com/KillzXGaming/Switch-Toolbox
synced 2024-11-23 13:03:15 +00:00
24 lines
525 B
C#
24 lines
525 B
C#
using System;
|
|
using OpenTK;
|
|
using OpenTK.Graphics.OpenGL;
|
|
|
|
namespace FirstPlugin
|
|
{
|
|
public class AlphaGLControl
|
|
{
|
|
public bool EnableAlphaTest = false;
|
|
|
|
public AlphaFunction AlphaFunction;
|
|
public float AlphaTestRef = 0.5f;
|
|
|
|
public void LoadRenderPass()
|
|
{
|
|
if (EnableAlphaTest)
|
|
GL.Enable(EnableCap.AlphaTest);
|
|
else
|
|
GL.Disable(EnableCap.AlphaTest);
|
|
|
|
GL.AlphaFunc(AlphaFunction, AlphaTestRef);
|
|
}
|
|
}
|
|
}
|