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 | |
| parent | 1169cf72ec435a495e1449bdf222bc0ccfd6f62a (diff) | |
Moved around some logic
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/black.rs | 4 | ||||
| -rw-r--r-- | examples/bmp.rs | 10 | ||||
| -rw-r--r-- | examples/square.rs | 2 |
3 files changed, 12 insertions, 4 deletions
diff --git a/examples/black.rs b/examples/black.rs index a4237a4..fc53ab1 100644 --- a/examples/black.rs +++ b/examples/black.rs @@ -8,8 +8,8 @@ fn main() { // configure the render window let config = RenderWindowConfig { vsync: false, - mode: alligator_render::config::WindowMode::BorderlessFullscreen, - title: "Black Screen.exe", + //mode: alligator_render::config::WindowMode::BorderlessFullscreen, + //title: "Black Screen.exe", ..Default::default() }; 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() diff --git a/examples/square.rs b/examples/square.rs index 7941fe1..1859647 100644 --- a/examples/square.rs +++ b/examples/square.rs @@ -19,7 +19,7 @@ fn main() { let mut renderer = Renderer::new(&config, &event_loop).unwrap(); let texture = renderer - .texture_from_mem(texture, ImageFormat::Ico) + .texture_from_memory(texture, ImageFormat::Ico) .unwrap(); let width = renderer.texture_width(texture).unwrap(); let height = renderer.texture_height(texture).unwrap(); |
