I was wondering if GLSL has functionality for header files. This comes in handy for the compute shader where one may use routines over and over again, such as some image processing functions. I have seen some image processing examples in GLSL for the compute shader but they do not make use of header files, which makes me think that the compute shaders practicality is limited to smaller source code computations. So is there a way to have includes in the compute shader?
Well the only way to load a source is through glShaderSource. It is possible to get back a binary. Is it possible to compile routines into binaries and use them at run time in a GL context?
The short answer is probably to use OpenCL with an associated OpenGL interop, but I am just curious about the compute shader.