diff --git a/Src/Noesis/Core/Src/Core/RenderDevice.cs b/Src/Noesis/Core/Src/Core/RenderDevice.cs index 93a145d..db35a74 100644 --- a/Src/Noesis/Core/Src/Core/RenderDevice.cs +++ b/Src/Noesis/Core/Src/Core/RenderDevice.cs @@ -333,7 +333,9 @@ public static Shader.Vertex.Format.Attr.Type.Enum TypeForAttr(Shader.Vertex.Form 1, 3, 1, 1, 0, 4, 2, 2 }; - return (Shader.Vertex.Format.Attr.Type.Enum)map[(int)attr]; + int index = Array.IndexOf(Enum.GetValues(typeof(Shader.Vertex.Format.Attr.Enum)), attr); + + return (Shader.Vertex.Format.Attr.Type.Enum)map[index]; } ///