Rust-like syntax for OpenGL Shading Language
glassful translates a small subset of Rust to OpenGL Shading Language.
Besides one's personal preferences regarding Rust-like vs. C-like syntax, this has a few specific advantages for the Rust programmer:
The library is still in a very early stage! Many improvements are possible. See the issue tracker and don't hesitate to send pull requests :)
There are three ways to invoke the translator. The language syntax is exactly the same in all three cases.
…See examples/gradient/ for a full glium/glutin example.
$ ./target/glassful shader.glslextern crate glassful;
pub fn main() {
let prog = io::stdin().read_to_end().unwrap();
let prog = String::from_utf8(prog).unwrap();
print!("{}", glassful::translate(prog));
}No open issues yet, or sync has not completed.