Class ShaderProgramLoader


AssetLoader for Shader instances loaded from text files. If the file suffix is ".vert", it is assumed to be a vertex shader, and a fragment shader is found using the same file name with a ".frag" suffix. And vice versa if the file suffix is ".frag". These default suffixes can be changed in the ShaderProgramLoader constructor.

For all other file suffixes, the same file is used for both (and therefore should internally distinguish between the programs using preprocessor directives and Shader.prependVertexCode and Shader.prependFragmentCode).

The above default behavior for finding the files can be overridden by explicitly setting the file names in a ShaderProgramLoader.ShaderProgramParameter. The parameter can also be used to prepend code to the programs.