aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics/Gal/OpenGL/OGLEnumConverter.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx.Graphics/Gal/OpenGL/OGLEnumConverter.cs')
-rw-r--r--Ryujinx.Graphics/Gal/OpenGL/OGLEnumConverter.cs16
1 files changed, 16 insertions, 0 deletions
diff --git a/Ryujinx.Graphics/Gal/OpenGL/OGLEnumConverter.cs b/Ryujinx.Graphics/Gal/OpenGL/OGLEnumConverter.cs
index 4cc0a039..d266a87a 100644
--- a/Ryujinx.Graphics/Gal/OpenGL/OGLEnumConverter.cs
+++ b/Ryujinx.Graphics/Gal/OpenGL/OGLEnumConverter.cs
@@ -81,6 +81,22 @@ namespace Ryujinx.Graphics.Gal.OpenGL
throw new NotImplementedException(Format.ToString());
}
+ public static All GetTextureSwizzle(GalTextureSource Source)
+ {
+ switch (Source)
+ {
+ case GalTextureSource.Zero: return All.Zero;
+ case GalTextureSource.Red: return All.Red;
+ case GalTextureSource.Green: return All.Green;
+ case GalTextureSource.Blue: return All.Blue;
+ case GalTextureSource.Alpha: return All.Alpha;
+ case GalTextureSource.OneInt: return All.One;
+ case GalTextureSource.OneFloat: return All.One;
+ }
+
+ throw new ArgumentException(nameof(Source));
+ }
+
public static TextureWrapMode GetTextureWrapMode(GalTextureWrap Wrap)
{
switch (Wrap)