1
0
Fork 0
mirror of https://github.com/Ryujinx/Ryujinx.git synced 2024-10-01 12:30:00 +02:00
Ryujinx/Ryujinx.Graphics.OpenGL/Converters/DepthModeConverter.cs

21 lines
538 B
C#
Raw Normal View History

using OpenTK.Graphics.OpenGL;
using Ryujinx.Graphics.GAL;
using System;
namespace Ryujinx.Graphics.OpenGL
{
static class DepthModeConverter
{
public static ClipDepthMode Convert(this DepthMode mode)
{
switch (mode)
{
case DepthMode.MinusOneToOne: return ClipDepthMode.NegativeOneToOne;
case DepthMode.ZeroToOne: return ClipDepthMode.ZeroToOne;
}
throw new ArgumentException($"Invalid depth mode \"{mode}\".");
}
}
}