summaryrefslogtreecommitdiff
path: root/examples/bmp.rs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/bmp.rs')
-rw-r--r--examples/bmp.rs11
1 files changed, 6 insertions, 5 deletions
diff --git a/examples/bmp.rs b/examples/bmp.rs
index a384f7b..b8e4011 100644
--- a/examples/bmp.rs
+++ b/examples/bmp.rs
@@ -23,12 +23,13 @@ fn main() {
let mut renderer = Renderer::new(&config, &event_loop).unwrap();
let texture = renderer
- .texture_from_memory(texture, ImageFormat::Bmp)
+ .textures_mut()
+ .load_from_memory(texture, ImageFormat::Bmp)
.unwrap();
- let width = renderer.texture_width(texture).unwrap();
- let height = renderer.texture_height(texture).unwrap();
- let x = renderer.texture_x(texture).unwrap();
- let y = renderer.texture_y(texture).unwrap();
+ let width = renderer.textures().texture_width(texture).unwrap();
+ let height = renderer.textures().texture_height(texture).unwrap();
+ let x = renderer.textures().texture_x(texture).unwrap();
+ let y = renderer.textures().texture_y(texture).unwrap();
renderer.instances_mut().push_instance(Instance {
position: [-0.5, 0.0],