how can I get shader srccode after #preprocess?

Hi,

I am a game developer and a heavy user of Cg and HLSL. My current project is using OGL ES2.0, and I’m building the GLSL shader validation tool for in-house use.

I managed to complie the GLSL shader using glCompileShader() and using glGetShaderSource to grab the source code of the succeed shader code.

My tool simply extend the GLSL source to support #include tag and my plan is to use #preprocessor to produce the final code

Anyway the sourcecode I got from glGetShaderSource() still contain the #define, #ifdef tag which is harder to read.
Is there anyway (using GL functions) that I can get the shader code after the #preprocess step?

Thanks for any helps
Cheers,
Wittawat

Is there anyway (using GL functions) that I can get the shader code after the #preprocess step?

No. glGetShaderSource returns the source string. The string you gave it.