mirror of
https://github.com/GreemDev/Ryujinx
synced 2024-12-24 12:56:39 +01:00
49 lines
1.4 KiB
C#
49 lines
1.4 KiB
C#
|
using OpenTK.Graphics.OpenGL;
|
||
|
|
||
|
namespace Ryujinx.Graphics.Gal.OpenGL
|
||
|
{
|
||
|
class OGLBlend
|
||
|
{
|
||
|
public void Enable()
|
||
|
{
|
||
|
GL.Enable(EnableCap.Blend);
|
||
|
}
|
||
|
|
||
|
public void Disable()
|
||
|
{
|
||
|
GL.Disable(EnableCap.Blend);
|
||
|
}
|
||
|
|
||
|
public void Set(
|
||
|
GalBlendEquation Equation,
|
||
|
GalBlendFactor FuncSrc,
|
||
|
GalBlendFactor FuncDst)
|
||
|
{
|
||
|
GL.BlendEquation(
|
||
|
OGLEnumConverter.GetBlendEquation(Equation));
|
||
|
|
||
|
GL.BlendFunc(
|
||
|
OGLEnumConverter.GetBlendFactorSrc(FuncSrc),
|
||
|
OGLEnumConverter.GetBlendFactorDst(FuncDst));
|
||
|
}
|
||
|
|
||
|
public void SetSeparate(
|
||
|
GalBlendEquation EquationRgb,
|
||
|
GalBlendEquation EquationAlpha,
|
||
|
GalBlendFactor FuncSrcRgb,
|
||
|
GalBlendFactor FuncDstRgb,
|
||
|
GalBlendFactor FuncSrcAlpha,
|
||
|
GalBlendFactor FuncDstAlpha)
|
||
|
{
|
||
|
GL.BlendEquationSeparate(
|
||
|
OGLEnumConverter.GetBlendEquation(EquationRgb),
|
||
|
OGLEnumConverter.GetBlendEquation(EquationAlpha));
|
||
|
|
||
|
GL.BlendFuncSeparate(
|
||
|
OGLEnumConverter.GetBlendFactorSrc(FuncSrcRgb),
|
||
|
OGLEnumConverter.GetBlendFactorDst(FuncDstRgb),
|
||
|
OGLEnumConverter.GetBlendFactorSrc(FuncSrcAlpha),
|
||
|
OGLEnumConverter.GetBlendFactorDst(FuncDstAlpha));
|
||
|
}
|
||
|
}
|
||
|
}
|