jstimpfle / glsl-processor

Parse and preprocess glsl files

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Glsl-processor is a tool to inspect GLSL shaders. Its intended use is as part
of build setups, to generate interfaces to the shaders. Glsl-processor can
increase developer productivity because it enables automation of the tedious
process of compiling, linking, and using shaders. Enough information is
provided to allow writing wrappers that set uniforms and attribute pointers in
a type-safe way. There is also is some experimental ode for handling of
#include directives.

Glsl-processor is written in pure C and weighs about 2000 lines. Only
dependency is a C99 compiler and a libc.

Building
--------

Typical use will be that you write a custom C program that links against the
glsl-processor code. You can either build glsl-processor as a static library,
using the provided Makefile / .vcxproj file. Or, you can just add all the files
under src/ to your program and build everything at once. If you use your own
method, just make sure to build the glsl-processor code as C99, and make sure
to add the include/ directory to the list of include directories.

For an example of a program that uses glsl-processor, look at example.c. You
can compile it using "make example" (Linux) or by compiling the
glsl-processor-example project that is included in the .sln (Windows). Or
again, just compile and link all of example.c and src/*.

Once you compiled the example, you can run it and look at the output produced
in the autogenerated/ directory.

About

Parse and preprocess glsl files


Languages

Language:C 96.6%Language:GLSL 2.9%Language:Makefile 0.5%