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.

595 B

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"));