The standards of OpenGL/GLSL are evolving constantly, we enter to the era of programmable graphic pipeline at the same time, however, the new interface functions also make it a bit complicated. And there is a lack of simple and complex example programs. On this webpage, I do want to fill this gap by providing example programs using OpenGL with GLSL.
First of all, I will give some introduction about the relation between OpenGL and GLSL; In past, the version of OpenGL and GLSL is not uniform (The corresponding are OpenGL2.2~GLSL1.2, OpenGL3.0~GLSL1.3, OpenGL3.1~GLSL1.4, OpenGL3.2~GLSL1.5). Until 2010, khronos committee decided to unify the two versions, so now OpenGL3.3/4.0 are corresponding to GLSL3.3/4.0 (Note, ShaderModel 4.0 graphics can reach the highest version).
First of all, I will give some introduction about the relation between OpenGL and GLSL; In past, the version of OpenGL and GLSL is not uniform (The corresponding are OpenGL2.2~GLSL1.2, OpenGL3.0~GLSL1.3, OpenGL3.1~GLSL1.4, OpenGL3.2~GLSL1.5). Until 2010, khronos committee decided to unify the two versions, so now OpenGL3.3/4.0 are corresponding to GLSL3.3/4.0 (Note, ShaderModel 4.0 graphics can reach the highest version).
Next, I will give a simplified diagram to describe the pipeline of OpenGL from version 3.2 forwards, and the red stars part can show the new GPU feature, which is not included before version 3.2: