diff --git a/src/Graphics/VertexBindingAndAttributes.cs b/src/Graphics/VertexBindingAndAttributes.cs index 2718557..44217eb 100644 --- a/src/Graphics/VertexBindingAndAttributes.cs +++ b/src/Graphics/VertexBindingAndAttributes.cs @@ -14,7 +14,7 @@ namespace MoonWorks.Graphics VertexAttributes = attributes; } - public static VertexBindingAndAttributes Create(uint bindingIndex, VertexInputRate inputRate = VertexInputRate.Vertex) where T : unmanaged, IVertexType + public static VertexBindingAndAttributes Create(uint bindingIndex, uint locationOffset = 0, VertexInputRate inputRate = VertexInputRate.Vertex) where T : unmanaged, IVertexType { VertexBinding binding = VertexBinding.Create(bindingIndex, inputRate); VertexAttribute[] attributes = new VertexAttribute[T.Formats.Length]; @@ -27,7 +27,7 @@ namespace MoonWorks.Graphics attributes[i] = new VertexAttribute { Binding = bindingIndex, - Location = i, + Location = locationOffset + i, Format = format, Offset = offset };