Initial code to test macroquad
This commit is contained in:
parent
40602d1b8c
commit
4c38a6550f
3
.gitattributes
vendored
Normal file
3
.gitattributes
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
*.png filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.jpg filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.jpeg filter=lfs diff=lfs merge=lfs -text
|
||||||
7
Cargo.toml
Normal file
7
Cargo.toml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
[package]
|
||||||
|
name = "photo-frame"
|
||||||
|
version = "0.1.0"
|
||||||
|
edition = "2021"
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
macroquad = "0.4.13"
|
||||||
BIN
examples/ferris.png
(Stored with Git LFS)
Executable file
BIN
examples/ferris.png
(Stored with Git LFS)
Executable file
Binary file not shown.
12
src/main.rs
Normal file
12
src/main.rs
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
use macroquad::prelude::*;
|
||||||
|
|
||||||
|
#[macroquad::main("Texture")]
|
||||||
|
async fn main() {
|
||||||
|
let texture: Texture2D = load_texture("examples/ferris.png").await.unwrap();
|
||||||
|
|
||||||
|
loop {
|
||||||
|
clear_background(LIGHTGRAY);
|
||||||
|
draw_texture(&texture, 0., 0., WHITE);
|
||||||
|
next_frame().await
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user