location offset param for vertex input shortcut

pull/53/head
cosmonaut 2024-01-26 19:43:14 -08:00
parent 34e6c1e720
commit 5e16cba94b
1 changed files with 2 additions and 2 deletions

View File

@ -14,7 +14,7 @@ namespace MoonWorks.Graphics
VertexAttributes = attributes;
}
public static VertexBindingAndAttributes Create<T>(uint bindingIndex, VertexInputRate inputRate = VertexInputRate.Vertex) where T : unmanaged, IVertexType
public static VertexBindingAndAttributes Create<T>(uint bindingIndex, uint locationOffset = 0, VertexInputRate inputRate = VertexInputRate.Vertex) where T : unmanaged, IVertexType
{
VertexBinding binding = VertexBinding.Create<T>(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
};