In the course of work with the GLSL shaders I have a few helpful notes on compatibility:
1) # version 120 – a string indicating the version of the shader should be the first in the code, otherwise ATI swears at compile time. I have this error was the result of the shader assembly of parts.
2) most of the old ATI and INTEL cards do not support glsl shaders, instead they have only enhance GL_ARB_VERTEX_PROGRAM, GL_ARB_FRAGMENT_PROGRAM. Out here there is very concise – download library CG from NVidia and recompile the shaders into the arb programs.
For example: cgc-glsl shader.glsl-profile arbvp1-o vertex.vp
In this case, profile arbvp1 for vertex programs and arbfp1 – for the fragment.
3) The emergence glsl shaders, command glGetString complemented with new possible argument GL_SHADING_LANGUAGE_VERSION, which returns the version of the glsl shader.
4) Remember that NVidia has a very useful utility ShaderPerf – analysis of the number of shader instructions, and the speed of execution, as well as sweep shader performance for different video cards and a family of graphics NVidia chipsets. There is also an opportunity to compare the performance of two different shaders to each other.
5) Do not specify real numbers with f at the end as 1.0f, simply write 1.0. Also, ATI is very picky to the writting a real number with no fractional part.
6) Useful utility OpenGL Extension Viewer with a database of support OpenGL extensions for most video cards. http://www.realtech-vr.com/glview/