title: Using OpenGL core profile with Mesa 10 and GLFW3
body: <p>I am running Arch Linux with Mesa 10 on an HP laptop with an Intel HD 3000 GPU.  (There is also an ATI card but I shut it off at boot.)  I am trying to run OpenGL code with the core profile. OpenGL 3.1 and GLSL 1.4 should be supported according to glxinfo:</p>
  
  <pre><code>-&gt; % glxinfo | grep version
  OpenGL core profile version string: 3.1 (Core Profile) Mesa 10.0.1
  OpenGL core profile shading language version string: 1.40
  OpenGL version string: 3.0 Mesa 10.0.1
  OpenGL shading language version string: 1.3
  </code></pre>
  
  <p>However, when I compile a GLFW program, try to force the core profile, and ask for the OpenGL version like so:</p>
  
  <pre><code>#include &lt;GL/glew.h&gt;
  #include &lt;GLFW/glfw3.h&gt;
  
  int main(void)
  {
      // Use OpenGL 3.1 core profile
      glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
      glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);
      glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
      glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 1);
      glfwWindowHint(GLFW_CONTEXT_REVISION, 0);
  
      // Create opengl context
      int window_width = 1024;
      int window_height = 768;
      GLFWwindow* window = initialize_glfw(window_width, window_height);
      if (!window)
      {
          glfwTerminate();
          std::exit(EXIT_FAILURE);
      }
  
      // Display OpenGL version
      int major, minor, rev, client, forward, profile;
      glfwGetVersion(&amp;major, &amp;minor, &amp;rev);
      std::cout &lt;&lt; "OpenGL - " &lt;&lt; major &lt;&lt; "." &lt;&lt; minor &lt;&lt; "." &lt;&lt; rev &lt;&lt; std::endl;
  }
  </code></pre>
  
  <p>as well as compile shaders with GLSL #version 140, this is the printed output:</p>
  
  <pre><code>-&gt; % ./main
  OpenGL - 3.0.3
  Shader compilation failed with this message:
  0:1(10): error: GLSL 1.40 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
  </code></pre>
  
  <p>So, it seems like OpenGL 3.1 and GLSL 1.4 should be supported, but they are not being used in my GLFW program.  Can anyone tell me what might be wrong?</p>