Creating glsl library
GLSL does not support C++ style namespaces. You might want to do some regex magic before parsing the shader, replacing '::' with '_' or something. You might want to have a preprocessor of sorts - or just forget about it entirely.