diff options
| author | Micha White <botahamec@outlook.com> | 2022-10-12 12:06:37 -0400 |
|---|---|---|
| committer | Micha White <botahamec@outlook.com> | 2022-10-12 12:06:37 -0400 |
| commit | 3c1822640f09d23c55a5e9a8fe4d131eb539d2f4 (patch) | |
| tree | d2180000735118faeceb5148c3c5552381e6d0fc /examples | |
| parent | 3352e94bade525c9922b448208b1e6c44fc3340d (diff) | |
Move out instance logic
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/bmp.rs | 4 | ||||
| -rw-r--r-- | examples/square.rs | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/examples/bmp.rs b/examples/bmp.rs index 98561ba..a384f7b 100644 --- a/examples/bmp.rs +++ b/examples/bmp.rs @@ -30,7 +30,7 @@ fn main() { let x = renderer.texture_x(texture).unwrap(); let y = renderer.texture_y(texture).unwrap(); - renderer.push_instance(Instance { + renderer.instances_mut().push_instance(Instance { position: [-0.5, 0.0], size: [0.75; 2], texture_size: [width, height], @@ -38,7 +38,7 @@ fn main() { ..Default::default() }); - renderer.push_instance(Instance { + renderer.instances_mut().push_instance(Instance { position: [0.5, 0.0], size: [0.75; 2], texture_size: [width, height], diff --git a/examples/square.rs b/examples/square.rs index 1859647..95a5c8b 100644 --- a/examples/square.rs +++ b/examples/square.rs @@ -26,7 +26,7 @@ fn main() { let x = renderer.texture_x(texture).unwrap(); let y = renderer.texture_y(texture).unwrap(); - renderer.push_instance(Instance { + renderer.instances_mut().push_instance(Instance { texture_size: [width, height], texture_coordinates: [x, y], ..Default::default() |
