title: Shader can't be compiled
body: <p>I'm following book "OpenGL Programming Guide 8th Edition". I just want to run the first program introduced in the book on my Mac.</p>
  
  <p>It's Mavericks + Xcode 4.6.1 + Intel HD graphics 4000. So the problem is, the shader can't be compiled.</p>
  
  <p>Shader codes:</p>
  
  <pre><code>#version 410 core
  
  layout(location = 0) in vec4 vPosition;
  
  void
  main()
  {
      gl_Position = vPosition;
  }
  </code></pre>
  
  <p>And the error message is:</p>
  
  <pre><code>Shader compilation failed: ERROR: 0:1: '' :  version '410' is not supported
  ERROR: 0:1: '' : syntax error #version
  ERROR: 0:3: 'layout' : syntax error syntax error
  </code></pre>
  
  <p>I tried version 420/400/330, none of them works.</p>
  
  <p>By the way, the program uses latest glew 1.10(<a href="http://glew.sourceforge.net" rel="noreferrer">http://glew.sourceforge.net</a>), and I found that I have to set "glewExperimental = GL_TRUE;" before calling glewInit. Otherwise "glGenVertexArray" is a NULL pointer. So I'm wondering maybe glew doesn't support Mavericks?</p>