From 230c1b41b451a74d32be7a82ed443e6e40f2a890 Mon Sep 17 00:00:00 2001 From: TheSpydog Date: Wed, 4 Jan 2023 18:44:56 +0000 Subject: [PATCH] Add IndirectDrawCommand struct (#39) Co-authored-by: Caleb Cornett Reviewed-on: https://gitea.moonside.games/MoonsideGames/MoonWorks/pulls/39 Co-authored-by: TheSpydog Co-committed-by: TheSpydog --- src/Graphics/RefreshStructs.cs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/Graphics/RefreshStructs.cs b/src/Graphics/RefreshStructs.cs index af7f9b33..6704a9c7 100644 --- a/src/Graphics/RefreshStructs.cs +++ b/src/Graphics/RefreshStructs.cs @@ -364,4 +364,25 @@ namespace MoonWorks.Graphics BlendState = blendState; } } + + [StructLayout(LayoutKind.Sequential)] + public struct IndirectDrawCommand + { + public uint VertexCount; + public uint InstanceCount; + public uint FirstVertex; + public uint FirstInstance; + + public IndirectDrawCommand( + uint vertexCount, + uint instanceCount, + uint firstVertex, + uint firstInstance + ) { + VertexCount = vertexCount; + InstanceCount = instanceCount; + FirstVertex = firstVertex; + FirstInstance = firstInstance; + } + } }