mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2024-11-15 09:35:27 +00:00
26 lines
836 B
C#
26 lines
836 B
C#
using OpenTK.Graphics.OpenGL;
|
|
using Ryujinx.Graphics.GAL.Blend;
|
|
using System;
|
|
|
|
namespace Ryujinx.Graphics.OpenGL
|
|
{
|
|
static class BlendOpConverter
|
|
{
|
|
public static BlendEquationMode Convert(this BlendOp op)
|
|
{
|
|
switch (op)
|
|
{
|
|
case BlendOp.Add: return BlendEquationMode.FuncAdd;
|
|
case BlendOp.Subtract: return BlendEquationMode.FuncSubtract;
|
|
case BlendOp.ReverseSubtract: return BlendEquationMode.FuncReverseSubtract;
|
|
case BlendOp.Minimum: return BlendEquationMode.Min;
|
|
case BlendOp.Maximum: return BlendEquationMode.Max;
|
|
}
|
|
|
|
return BlendEquationMode.FuncAdd;
|
|
|
|
throw new ArgumentException($"Invalid blend operation \"{op}\".");
|
|
}
|
|
}
|
|
}
|