1b8e80941Smrgglcpp -- GLSL "C" preprocessor 2b8e80941Smrg 3b8e80941SmrgThis is a simple preprocessor designed to provide the preprocessing 4b8e80941Smrgneeds of the GLSL language. The requirements for this preprocessor are 5b8e80941Smrgspecified in the GLSL 1.30 specification availble from: 6b8e80941Smrg 7b8e80941Smrghttp://www.opengl.org/registry/doc/GLSLangSpec.Full.1.30.10.pdf 8b8e80941Smrg 9b8e80941SmrgThis specification is not precise on some semantics, (for example, 10b8e80941Smrg#define and #if), defining these merely "as is standard for C++ 11b8e80941Smrgpreprocessors". To fill in these details, I've been using a draft of 12b8e80941Smrgthe C99 standard as available from: 13b8e80941Smrg 14b8e80941Smrghttp://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf 15b8e80941Smrg 16b8e80941SmrgAny downstream compiler accepting output from glcpp should be prepared 17b8e80941Smrgto encounter and deal with the following preprocessor macros: 18b8e80941Smrg 19b8e80941Smrg #line 20b8e80941Smrg #pragma 21b8e80941Smrg #extension 22b8e80941Smrg 23b8e80941SmrgAll other macros will be handled according to the GLSL specification 24b8e80941Smrgand will not appear in the output. 25b8e80941Smrg 26b8e80941SmrgKnown limitations 27b8e80941Smrg----------------- 28b8e80941SmrgA file that ends with a function-like macro name as the last 29b8e80941Smrgnon-whitespace token will result in a parse error, (where it should be 30b8e80941Smrgpassed through as is).