Archived
1
0
Fork 0
forked from Mirror/Ryujinx
This repository has been archived on 2024-10-11. You can view files and clone it, but cannot push or open issues or pull requests.
jinx/Ryujinx.Graphics.OpenGL/Converters/MinFilterConverter.cs
2020-01-09 02:13:00 +01:00

24 lines
951 B
C#

using OpenTK.Graphics.OpenGL;
using Ryujinx.Graphics.GAL.Sampler;
using System;
namespace Ryujinx.Graphics.OpenGL
{
static class MinFilterConverter
{
public static TextureMinFilter Convert(this MinFilter filter)
{
switch (filter)
{
case MinFilter.Nearest: return TextureMinFilter.Nearest;
case MinFilter.Linear: return TextureMinFilter.Linear;
case MinFilter.NearestMipmapNearest: return TextureMinFilter.NearestMipmapNearest;
case MinFilter.LinearMipmapNearest: return TextureMinFilter.LinearMipmapNearest;
case MinFilter.NearestMipmapLinear: return TextureMinFilter.NearestMipmapLinear;
case MinFilter.LinearMipmapLinear: return TextureMinFilter.LinearMipmapLinear;
}
throw new ArgumentException($"Invalid filter \"{filter}\".");
}
}
}