 <p>At the begining of your fragment shader source file (the very first line) put this:</p> <pre><code>#version 140 </code></pre> <p>This means that you are telling the GLSL compiler that you use the version 1.40 of the shading language (you can, of course, use a higher version - see <a href="https://en.wikipedia.org/wiki/GLSL#Versions" rel="nofollow">Wikipedia</a> for details).</p> <p>Alternatively, if your OpenGL driver (and/or hardware) doesn't support GLSL 1.40 fully (which is part of OpenGL 3.1), but only GLSL 1.30 (OpenGL 3.0), you can try the following:</p> <pre><code>#version 130 #extension GL_ARB_uniform_buffer_object : require </code></pre> <p>However, this one will work only if your OpenGL 3.0 driver supports the GL_ARB_uniform_buffer_object extension.</p> <p>Hope this helps.</p>