<<< Vertex and Fragment shader example | Index | Compiling a shader program example >>> |
Each shader has to begin with the version directive:
#version 300
The the version indicates minimal version of GLSL language expected by the shader code. The following table provides correspondence between OpenGL and GLSL versions:
_____________________________________ OpenGL GLSL Directive version version to use -------- -------- ------------- 3.0 1.3 #version 130 3.1 1.4 #version 140 3.2 1.5 #version 150 3.3 3.3 #version 330 4.0 4.0 #version 400 // Since March 2010 versions match 4.1 4.1 #version 410 ... ... ... _____________________________________
<<< Vertex and Fragment shader example | Index | Compiling a shader program example >>> |