Introduce draw_mesh_cache in mesh::Renderer
This commit is contained in:
parent
42bc4af972
commit
afb3b8fce6
8 changed files with 119 additions and 69 deletions
|
|
@ -100,7 +100,7 @@ mod rainbow {
|
|||
|
||||
let mesh = Mesh::Solid {
|
||||
buffers: mesh::Indexed {
|
||||
vertices: [
|
||||
vertices: vec![
|
||||
SolidVertex2D {
|
||||
position: posn_center,
|
||||
color: color::pack([1.0, 1.0, 1.0, 1.0]),
|
||||
|
|
@ -137,9 +137,8 @@ mod rainbow {
|
|||
position: posn_l,
|
||||
color: color::pack(color_v),
|
||||
},
|
||||
]
|
||||
.into(),
|
||||
indices: [
|
||||
],
|
||||
indices: vec![
|
||||
0, 1, 2, // TL
|
||||
0, 2, 3, // T
|
||||
0, 3, 4, // TR
|
||||
|
|
@ -148,8 +147,7 @@ mod rainbow {
|
|||
0, 6, 7, // B
|
||||
0, 7, 8, // BL
|
||||
0, 8, 1, // L
|
||||
]
|
||||
.into(),
|
||||
],
|
||||
},
|
||||
transformation: Transformation::IDENTITY,
|
||||
clip_bounds: Rectangle::INFINITE,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue