tinyshader 0.1.0

Rust bindings for tinyshader
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use tinyshader::*;

fn main() {
    let output = CompilerOptions::new()
        .stage(ShaderStage::Fragment)
        .source(include_str!("shader.hlsl"), None)
        .entry_point("main")
        .compile();

    match output {
        Ok(output) => {
            println!("Compilation successful! Output length: {}", output.len());
        },
        Err(error_str) => {
            print!("Compile error:\n {}", error_str);
        }
    }
}