From 3ac1e5e5a9ebcb4beb2bfe149dd5095f2250f60d Mon Sep 17 00:00:00 2001 From: Irene Knapp Date: Mon, 20 Jul 2026 20:43:48 -0700 Subject: load a nontrivial model and render it with a texture yay Force-Push: yes Change-Id: Icb715692286c8560532ab73d32a49be8f485d790 --- build.rs | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'build.rs') diff --git a/build.rs b/build.rs index 7399346..ce74854 100644 --- a/build.rs +++ b/build.rs @@ -14,6 +14,7 @@ fn main() { fn process_all() -> std::io::Result<()> { process_shaders()?; process_textures()?; + process_models()?; Ok(()) } @@ -81,3 +82,24 @@ fn process_textures() -> std::io::Result<()> { Ok(()) } + +fn process_models() -> std::io::Result<()> { + for input in fs::read_dir("models")? { + let input_path = input?.path(); + if !input_path.is_file() { + continue; + } + + if let Some(Some(filename)) = input_path.file_name() + .map(|name| name.to_str()) + && filename.get(.. 1) == Some(".") + { + continue; + } + + println!("cargo::rerun-if-changed={}", input_path.display()); + } + + Ok(()) +} + -- cgit 1.4.1