1*61046927SAndroid Build Coastguard Workerglcpp -- GLSL "C" preprocessor 2*61046927SAndroid Build Coastguard Worker 3*61046927SAndroid Build Coastguard WorkerThis is a simple preprocessor designed to provide the preprocessing 4*61046927SAndroid Build Coastguard Workerneeds of the GLSL language. The requirements for this preprocessor are 5*61046927SAndroid Build Coastguard Workerspecified in the GLSL 1.30 specification availble from: 6*61046927SAndroid Build Coastguard Worker 7*61046927SAndroid Build Coastguard Workerhttp://www.opengl.org/registry/doc/GLSLangSpec.Full.1.30.10.pdf 8*61046927SAndroid Build Coastguard Worker 9*61046927SAndroid Build Coastguard WorkerThis specification is not precise on some semantics, (for example, 10*61046927SAndroid Build Coastguard Worker#define and #if), defining these merely "as is standard for C++ 11*61046927SAndroid Build Coastguard Workerpreprocessors". To fill in these details, I've been using a draft of 12*61046927SAndroid Build Coastguard Workerthe C99 standard as available from: 13*61046927SAndroid Build Coastguard Worker 14*61046927SAndroid Build Coastguard Workerhttp://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf 15*61046927SAndroid Build Coastguard Worker 16*61046927SAndroid Build Coastguard WorkerAny downstream compiler accepting output from glcpp should be prepared 17*61046927SAndroid Build Coastguard Workerto encounter and deal with the following preprocessor macros: 18*61046927SAndroid Build Coastguard Worker 19*61046927SAndroid Build Coastguard Worker #line 20*61046927SAndroid Build Coastguard Worker #pragma 21*61046927SAndroid Build Coastguard Worker #extension 22*61046927SAndroid Build Coastguard Worker 23*61046927SAndroid Build Coastguard WorkerAll other macros will be handled according to the GLSL specification 24*61046927SAndroid Build Coastguard Workerand will not appear in the output. 25*61046927SAndroid Build Coastguard Worker 26*61046927SAndroid Build Coastguard WorkerKnown limitations 27*61046927SAndroid Build Coastguard Worker----------------- 28*61046927SAndroid Build Coastguard WorkerA file that ends with a function-like macro name as the last 29*61046927SAndroid Build Coastguard Workernon-whitespace token will result in a parse error, (where it should be 30*61046927SAndroid Build Coastguard Workerpassed through as is).