summaryrefslogtreecommitdiff
path: root/examples/bmp.rs
diff options
context:
space:
mode:
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()