8 releases

0.7.4 Aug 19, 2024
0.7.3 Aug 19, 2024
0.7.2 Nov 5, 2023
0.7.1 Apr 4, 2023
0.5.0 Apr 6, 2021

#293 in Rendering

36 downloads per month

MIT license

110KB
2K SLoC

glslt_cli

glsltc is the default compiler front-end for the GLSLT language. To use the GLSLT transforms from Rust or Python code, see the documentation for the glslt crate.

Installation

Extract the pre-built binary for your platform from the releases somewhere in your $PATH.

Alternatively, you may compile GLSLT from source and install it using cargo install --force .

Command-line usage

GLSL Template compiler

Usage: glsltc [OPTIONS] [INPUT]...

Arguments:
  [INPUT]...  Input template files

Options:
  -q, --quiet                Quiet mode
  -v, --verbose...           Verbose mode. Repeat to increase verbosity
  -o, --output <OUTPUT>      Output file (defaults to stdout)
  -I <INCLUDE>               System include paths
  -K, --keep-fns <KEEP_FNS>  List of symbols to keep for minifying mode
  -p, --prefix <PREFIX>      Identifier prefix for generated code
  -h, --help                 Print help information

Examples

# Transform the GLSLT code in `sdf.glsl` to the output file `output.glsl`
glsltc -o output.glsl sdf.glsl

# Transform the GLSLT code in `sdf.glsl` to the output file `output.glsl`. Only keep
# transitive dependencies of the `mainImage` function (minifying mode).
glsltc -o output.glsl -K=mainImage sdf.glsl

Author

Alixinne alixinne@pm.me

Dependencies

~5–7.5MB
~130K SLoC