Skip to content
This repository has been archived by the owner on Mar 17, 2023. It is now read-only.

Shader linking

daanmichiels edited this page Oct 2, 2014 · 5 revisions

The shader source code is contained in the folder /src/shaders. Every shader has its own file, with file extension .glsl.

During the make process a python script shaderwriter.py is run which creates c++ header files in /src/shaders. Each header file defines a string which is the contents of a .glsl file, with special characters escaped. These headers are then included in /src/shaders.cpp, giving it access to the shader code. Once compilation is complete the header files are deleted from /src/shaders, as the strings are contained within the executable object file, and so they are no longer needed

Clone this wiki locally