OpenGL Shading Language backwards compatibility

Posted by Luca on Stack Overflow See other posts from Stack Overflow or by Luca
Published on 2010-04-13T16:32:09Z Indexed on 2010/04/20 22:43 UTC
Read the original article Hit count: 419

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

© Stack Overflow or respective owner

Related posts about opengl

Related posts about glsl