location offset param for vertex input shortcut
parent
34e6c1e720
commit
5e16cba94b
|
@ -14,7 +14,7 @@ namespace MoonWorks.Graphics
|
||||||
VertexAttributes = attributes;
|
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);
|
VertexBinding binding = VertexBinding.Create<T>(bindingIndex, inputRate);
|
||||||
VertexAttribute[] attributes = new VertexAttribute[T.Formats.Length];
|
VertexAttribute[] attributes = new VertexAttribute[T.Formats.Length];
|
||||||
|
@ -27,7 +27,7 @@ namespace MoonWorks.Graphics
|
||||||
attributes[i] = new VertexAttribute
|
attributes[i] = new VertexAttribute
|
||||||
{
|
{
|
||||||
Binding = bindingIndex,
|
Binding = bindingIndex,
|
||||||
Location = i,
|
Location = locationOffset + i,
|
||||||
Format = format,
|
Format = format,
|
||||||
Offset = offset
|
Offset = offset
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue