|
|
|
@ -1,6 +1,5 @@
|
|
|
|
|
use std::ffi::OsStr;
|
|
|
|
|
use std::fs::File;
|
|
|
|
|
use std::io::prelude::*;
|
|
|
|
|
use std::io::Write;
|
|
|
|
|
use std::path::Path;
|
|
|
|
|
use std::process::Command;
|
|
|
|
@ -10,7 +9,7 @@ fn main() -> std::io::Result<()> {
|
|
|
|
|
//shaders path
|
|
|
|
|
let shaders = Path::new("./src/shaders");
|
|
|
|
|
//shader target path
|
|
|
|
|
let out = Command::new("mkdir").arg("target/shaders/").output();
|
|
|
|
|
Command::new("mkdir").arg("target/shaders/").status()?;
|
|
|
|
|
|
|
|
|
|
let shader_target = Path::new("./target/shaders/");
|
|
|
|
|
//compile all glsl shaders
|
|
|
|
@ -28,7 +27,7 @@ fn main() -> std::io::Result<()> {
|
|
|
|
|
.arg(shader_path)
|
|
|
|
|
.arg("-o")
|
|
|
|
|
.arg(shader_file)
|
|
|
|
|
.status();
|
|
|
|
|
.status()?;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//include all compiled shaders in shaders.rs file in src dir
|
|
|
|
|