ShaderPreprocessor /

Class for parsing and processing GLSL preprocessor directives.

Detected files that need to be included, via the #include directive, are first searched for relative to the directory of the provided source path (if provided), and then relative to the search directories list. By default, the Platform's default assets path is added to this list, and you can add custom search directories with addSearchDirectory() .

If a recursive #include is detected, a ShaderPreprocessorExc will be thrown.

Adding #define statements are also supported, and you can set the #version via setVersion( int ) . If you are on OpenGL ES, then " es" will be appended to the version string.


Public Member Functions

  • ShaderPreprocessor ()