Initial work
This commit is contained in:
parent
f617fb542a
commit
1876b346fe
518 changed files with 15170 additions and 12486 deletions
25
Ryujinx.Graphics.OpenGL/Converters/BlendOpConverter.cs
Normal file
25
Ryujinx.Graphics.OpenGL/Converters/BlendOpConverter.cs
Normal file
|
@ -0,0 +1,25 @@
|
|||
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}\".");
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue