1
2use std::{
3 fmt::Debug,
4};
5
6#[derive(Default, Debug, Clone, Copy, PartialEq, Eq)]
9pub struct DrawArrayCommand {
10 vertex_count: u32,
11 instance_count: u32,
12 first_index: u32,
13 base_instance: u32,
14}
15
16#[derive(Default, Debug, Clone, Copy, PartialEq, Eq)]
19pub struct DrawElementsCommand {
20 element_count: u32,
21 instance_count: u32,
22 first_index: u32,
23 base_vertex: i32,
24 base_instance: u32,
25}
26
27#[derive(Default, Debug, Clone, Copy, PartialEq, Eq)]
30pub struct DispatchIndirectCommand {
31 num_groups_x: u32,
32 num_groups_y: u32,
33 num_groups_z: u32,
34}
35
36pub trait DrawCommand: Default + Clone + Copy + Sized + Debug {}
38
39impl DrawCommand for DrawArrayCommand {}
40impl DrawCommand for DrawElementsCommand {}
41impl DrawCommand for DispatchIndirectCommand {}