diff --git a/src/Graphics/RefreshStructs.cs b/src/Graphics/RefreshStructs.cs index d2b8407..6b046bd 100644 --- a/src/Graphics/RefreshStructs.cs +++ b/src/Graphics/RefreshStructs.cs @@ -127,12 +127,12 @@ namespace MoonWorks.Graphics public uint Stride; public VertexInputRate InputRate; - public static VertexBinding Create(uint binding = 0) where T : unmanaged + public static VertexBinding Create(uint binding = 0, VertexInputRate inputRate = VertexInputRate.Vertex) where T : unmanaged { return new VertexBinding { Binding = binding, - InputRate = VertexInputRate.Vertex, + InputRate = inputRate, Stride = (uint) Marshal.SizeOf() }; } diff --git a/src/Graphics/VertexBindingAndAttributes.cs b/src/Graphics/VertexBindingAndAttributes.cs index cff9d55..2718557 100644 --- a/src/Graphics/VertexBindingAndAttributes.cs +++ b/src/Graphics/VertexBindingAndAttributes.cs @@ -14,9 +14,9 @@ namespace MoonWorks.Graphics VertexAttributes = attributes; } - public static VertexBindingAndAttributes Create(uint bindingIndex) where T : unmanaged, IVertexType + public static VertexBindingAndAttributes Create(uint bindingIndex, VertexInputRate inputRate = VertexInputRate.Vertex) where T : unmanaged, IVertexType { - VertexBinding binding = VertexBinding.Create(bindingIndex); + VertexBinding binding = VertexBinding.Create(bindingIndex, inputRate); VertexAttribute[] attributes = new VertexAttribute[T.Formats.Length]; uint offset = 0;