0
0
Fork 0
mirror of https://github.com/ryujinx-mirror/ryujinx.git synced 2024-12-25 00:45:45 +00:00
ryujinx-fork/Ryujinx.Graphics.OpenGL/Converters/FrontFaceConverter.cs

23 lines
597 B
C#
Raw Normal View History

2019-10-13 06:02:07 +00:00
using OpenTK.Graphics.OpenGL;
using Ryujinx.Graphics.GAL;
using System;
namespace Ryujinx.Graphics.OpenGL
{
static class FrontFaceConverter
{
public static FrontFaceDirection Convert(this FrontFace frontFace)
{
switch (frontFace)
{
case FrontFace.Clockwise: return FrontFaceDirection.Cw;
case FrontFace.CounterClockwise: return FrontFaceDirection.Ccw;
}
return FrontFaceDirection.Cw;
throw new ArgumentException($"Invalid front face \"{frontFace}\".");
}
}
}