pre double pipeline commit. The following will attempt to add another rendering stage for textured cuboids.
This commit is contained in:
parent
31d56ded3f
commit
c5bcd148ca
22 changed files with 854 additions and 53 deletions
41
build.rs
Normal file
41
build.rs
Normal file
|
@ -0,0 +1,41 @@
|
|||
use std::process::Command;
|
||||
use std::io::{self, Write};
|
||||
use std::path::Path;
|
||||
|
||||
fn main() {
|
||||
println!("cargo::rerun-if-changed=shaders/cube.frag");
|
||||
println!("cargo::rerun-if-changed=shaders/cube.geom");
|
||||
println!("cargo::rerun-if-changed=shaders/cube.vert");
|
||||
println!("cargo::rerun-if-changed=shaders/geo_cube.spv");
|
||||
println!("cargo::rerun-if-changed=shaders/frag_cube.spv");
|
||||
println!("cargo::rerun-if-changed=shaders/vert_cube.spv");
|
||||
|
||||
println!("cargo::rerun-if-changed=shaders/cuboid.frag");
|
||||
println!("cargo::rerun-if-changed=shaders/cuboid.geom");
|
||||
println!("cargo::rerun-if-changed=shaders/cuboid.vert");
|
||||
println!("cargo::rerun-if-changed=shaders/geo_cuboid.spv");
|
||||
println!("cargo::rerun-if-changed=shaders/frag_cuboid.spv");
|
||||
println!("cargo::rerun-if-changed=shaders/vert_cuboid.spv");
|
||||
|
||||
std::fs::remove_file("shaders/geo_cube.spv");
|
||||
std::fs::remove_file("shaders/frag_cube.spv");
|
||||
std::fs::remove_file("shaders/vert_cube.spv");
|
||||
std::fs::remove_file("shaders/geo_cuboid.spv");
|
||||
std::fs::remove_file("shaders/frag_cuboid.spv");
|
||||
std::fs::remove_file("shaders/vert_cuboid.spv");
|
||||
// probably need to check the os and have different versions
|
||||
let mut command = Command::new("./shaders/compile.bat");
|
||||
let output = command.output().expect("Failed to execute command");
|
||||
println!("status: {}", output.status);
|
||||
io::stdout().write_all(&output.stdout).unwrap();
|
||||
io::stderr().write_all(&output.stderr).unwrap();
|
||||
|
||||
assert!(output.status.success());
|
||||
|
||||
assert!(Path::new("shaders/geo_cube.spv").exists());
|
||||
assert!(Path::new("shaders/frag_cube.spv").exists());
|
||||
assert!(Path::new("shaders/vert_cube.spv").exists());
|
||||
assert!(Path::new("shaders/geo_cuboid.spv").exists());
|
||||
assert!(Path::new("shaders/frag_cuboid.spv").exists());
|
||||
assert!(Path::new("shaders/vert_cuboid.spv").exists());
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue