OpenGL Shading Language backwards compatibility
- by Luca
I've noticed that my GLSL shaders are not compilable when the GLSL version is lower than 130.
What are the most critical elements for having a backward compatible shader source? I don't want to have a full backward compatibility, but I'd like to understand the main guidelines for having simple (forward compatible) shaders running on GPU with GLSL lower than 130.
Of course the problem could be solved with the preprocessor
#if __VERSION__ < 130
#define VERTEX_IN attribute
#else
#define VERTER_IN in
#endif
But there probably many issues that I ignore.
Thank you