mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2024-11-15 17:45:26 +00:00
22 lines
609 B
C#
22 lines
609 B
C#
|
using OpenTK.Graphics.OpenGL;
|
||
|
using Ryujinx.Graphics.GAL;
|
||
|
using System;
|
||
|
|
||
|
namespace Ryujinx.Graphics.OpenGL
|
||
|
{
|
||
|
static class IndexTypeConverter
|
||
|
{
|
||
|
public static DrawElementsType Convert(this IndexType type)
|
||
|
{
|
||
|
switch (type)
|
||
|
{
|
||
|
case IndexType.UByte: return DrawElementsType.UnsignedByte;
|
||
|
case IndexType.UShort: return DrawElementsType.UnsignedShort;
|
||
|
case IndexType.UInt: return DrawElementsType.UnsignedInt;
|
||
|
}
|
||
|
|
||
|
throw new ArgumentException($"Invalid index type \"{type}\".");
|
||
|
}
|
||
|
}
|
||
|
}
|