aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.OpenGL/Converters/DepthModeConverter.cs
blob: a02f69d23a26feaf610dba3a7ea415b7a0a13414 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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}\".");
        }
    }
}