diff options
| author | Micha White <botahamec@outlook.com> | 2022-10-05 11:00:01 -0400 |
|---|---|---|
| committer | Micha White <botahamec@outlook.com> | 2022-10-05 11:00:01 -0400 |
| commit | ed5b952b313275e58102770e9dda29a7274c363c (patch) | |
| tree | e4212570a01d3cba217d0dd7bf0328f80c276cfb /examples/bmp.rs | |
| parent | 1169cf72ec435a495e1449bdf222bc0ccfd6f62a (diff) | |
Moved around some logic
Diffstat (limited to 'examples/bmp.rs')
| -rw-r--r-- | examples/bmp.rs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/examples/bmp.rs b/examples/bmp.rs index b527377..566e098 100644 --- a/examples/bmp.rs +++ b/examples/bmp.rs @@ -23,7 +23,7 @@ fn main() { let mut renderer = Renderer::new(&config, &event_loop).unwrap(); let texture = renderer - .texture_from_mem(texture, ImageFormat::Bmp) + .texture_from_memory(texture, ImageFormat::Bmp) .unwrap(); let width = renderer.texture_width(texture).unwrap(); let height = renderer.texture_height(texture).unwrap(); @@ -31,6 +31,14 @@ fn main() { let y = renderer.texture_y(texture).unwrap(); renderer.push_instance(Instance { + position: [-0.5, 0.0], + texture_size: [width, height], + texture_coordinates: [x, y], + ..Default::default() + }); + + renderer.push_instance(Instance { + position: [0.5, 0.0], texture_size: [width, height], texture_coordinates: [x, y], ..Default::default() |
