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 Init 7 years ago
src Init 7 years ago
.gitignore Init 7 years ago
Cargo.toml Init 7 years ago
README.md Init 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"));