Initial code to test macroquad

This commit is contained in:
Jean-Loup Beaussart 2024-11-01 23:52:42 +01:00
parent 40602d1b8c
commit 4c38a6550f
No known key found for this signature in database
GPG Key ID: 582B3C35EAFE46F8
4 changed files with 25 additions and 0 deletions

3
.gitattributes vendored Normal file
View 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
View 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

Binary file not shown.

12
src/main.rs Normal file
View 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
}
}