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