1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
//! Vertex related utilities including vertex specifications.

#[derive(Clone,Copy,Debug,Default)]
pub struct Vert2d {
  pub position : [f32; 2]
}
implement_vertex!(Vert2d, position);

#[derive(Clone,Copy,Debug,Default)]
pub struct Vert2dColor {
  pub position : [f32; 2],
  pub color    : [f32; 4]
}
implement_vertex!(Vert2dColor, position, color);

#[derive(Clone,Copy,Debug,Default)]
pub struct Vert2dLayer {
  pub position : [f32; 2],
  pub layer    : u16
}
implement_vertex!(Vert2dLayer, position, layer);

#[derive(Clone,Copy,Debug,Default)]
pub struct Vert2dTile {
  pub row    : i32,
  pub column : i32,
  pub tile   : u8
}
implement_vertex!(Vert2dTile, row, column, tile);

#[derive(Clone,Copy,Debug,Default)]
pub struct Vert3dScaleColor {
  pub position : [f32; 3],
  pub scale    : [f32; 3],
  pub color    : [f32; 4]
}
implement_vertex!(Vert3dScaleColor, position, scale, color);

#[derive(Clone,Copy,Debug,Default)]
pub struct Vert3dOrientationScaleColor {
  pub position    : [f32; 3],
  pub orientation : [[f32; 3]; 3],
  pub scale       : [f32; 3],
  pub color       : [f32; 4]
}
implement_vertex!(Vert3dOrientationScaleColor,
  position, orientation, scale, color);

#[derive(Clone,Copy,Debug,Default)]
pub struct Vert3dInstanced {
  pub inst_position : [f32; 3]
}
implement_vertex!(Vert3dInstanced, inst_position);