summaryrefslogtreecommitdiff
path: root/examples/bmp.rs
diff options
context:
space:
mode:
authorMicha White <botahamec@outlook.com>2022-10-05 11:00:01 -0400
committerMicha White <botahamec@outlook.com>2022-10-05 11:00:01 -0400
commited5b952b313275e58102770e9dda29a7274c363c (patch)
treee4212570a01d3cba217d0dd7bf0328f80c276cfb /examples/bmp.rs
parent1169cf72ec435a495e1449bdf222bc0ccfd6f62a (diff)
Moved around some logic
Diffstat (limited to 'examples/bmp.rs')
-rw-r--r--examples/bmp.rs10
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()