

OpenGL 4.2 supports GLSL 4.20 and all versions back to 1.40.


I've read various versions of the OpenGL spec I can't see any useful guarantees about backwards compatibility of GLSL support. Wouldn't it still be the case that I would have to write three different versions of the GLSL shaders?įrom reading around people seem to assume that GLSL 3.30 works on OpenGL 3.3 and all later versions, but that doesn't seem to be guaranteed by any spec before OpenGL 4.2. The compatibility profile isn't guaranteed to be available so let's say I choose to use OpenGL 3.3 core profile as the minimum requirement. Rabbid76 is suggesting to either use a specific core profile or use a compatibility profile. I think my question might really be, "How do I write OpenGL code that will work on any machine that supports at least OpenGL 2.0?" Bearing in mind that a compatibility profile is not guaranteed to be available.
