You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
panicbit
1830bca8c4
|
7 years ago | |
---|---|---|
src | 7 years ago | |
.gitignore | 7 years ago | |
Cargo.toml | 7 years ago | |
README.md | 7 years ago |
README.md
This is a convenience wrapper around the picasso
CLI
and is primarily intended to be used in build scripts.
Here is an example build.rs
:
extern crate picasso;
use std::env;
use std::path::PathBuf;
fn main() {
let out_dir = PathBuf::from(env::var("OUT_DIR").unwrap());
picasso::assemble(&["vshader.v.pica"], out_dir.join("vshader.v.shbin"))
.unwrap_or_else(|e| panic!("{}", e));
}
To embed the assembled shaders in your binary you can do the following:
static VSHADER_SHBIN: &[u8] = include_bytes!(concat!(env!("OUT_DIR"), "/vshader.v.shbin"));