is there any glsl for my opengl 3.1? i searched in google and no luck all different versions cause when i use different versions it creates syntax errors.
also if i do :
#version 330
is it for the other versions?
so if i got the glsl for my 3.1 what version do i put?
thanks
If memory serves, you want GLSL version 1.4 to get the absolute latest for that OpenGL version, so use #version 140.
OpenGL 3.3 was when they started syncing up the GL and GLSL version numbers IIRC (3.3 -> #version 330, 4.0 -> #version 400, etc.) Before that the correspondence was a bit odd (3.2 -> 1.5 == #version 150, 3.1 -> #version 140, etc.)
It’s a syntax highlighter; it’s not essential tech for using OpenGL. If the version of the highlighter is off a bit, so what? Just restrict yourself from using non 1.40 features. And your compiler should do that for you well enough.
Plus, nobody can tell you what syntax highlighter to use for your IDE without knowing what your IDE is.