MoonWorks/src/Graphics/State/VertexInputState.cs

26 lines
663 B
C#
Raw Normal View History

2022-02-23 05:14:32 +00:00
namespace MoonWorks.Graphics
{
2022-02-23 05:14:32 +00:00
/// <summary>
/// Specifies how to interpet vertex data in a buffer to be passed to the vertex shader.
/// </summary>
public struct VertexInputState
{
public VertexBinding[] VertexBindings;
public VertexAttribute[] VertexAttributes;
public static readonly VertexInputState Empty = new VertexInputState
2022-05-13 23:26:26 +00:00
{
VertexBindings = new VertexBinding[0],
VertexAttributes = new VertexAttribute[0]
};
2022-05-13 23:26:26 +00:00
public VertexInputState(
VertexBinding vertexBinding,
params VertexAttribute[] vertexAttributes
) {
VertexBindings = new VertexBinding[] { vertexBinding };
VertexAttributes = vertexAttributes;
}
2022-02-23 05:14:32 +00:00
}
}