title: Questions about GLFW behavior below GL 3.2
body: <p>Following <a href="http://www.opengl-tutorial.org/beginners-tutorials/tutorial-1-opening-a-window/" rel="nofollow">this tutorial</a> starting to learn opengl I have the following source code:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;GL/glew.h&gt;
  #include &lt;GL/glfw.h&gt;
  #include &lt;glm/glm.hpp&gt;
  
  using namespace glm;
  
  int
  main(void){
      if(!glfwInit())
      {
          fprintf( stderr, "Failed to initialize GLFW\n" );
          return -1;
      }
  
      glfwOpenWindowHint(GLFW_FSAA_SAMPLES, 4); // 4x antialiasing
      glfwOpenWindowHint(GLFW_OPENGL_VERSION_MAJOR, 3); // We want OpenGL 3.1
      glfwOpenWindowHint(GLFW_OPENGL_VERSION_MINOR, 1);
      glfwOpenWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); //We don't want the old OpenGL
  
      // Open a window and create its OpenGL context
      if(!glfwOpenWindow(1024, 768, 0,0,0,0, 32,0, GLFW_WINDOW))
      {
          int a = glfwOpenWindow(1024, 768, 0,0,0,0, 32,0, GLFW_WINDOW);
            fprintf( stderr, "Failed to open GLFW window\n" );
            glfwTerminate();
            return 1;
      }
  
  }
  </code></pre>
  
  <p>This always produces the "Failed to open GLFW window" error. I downloaded the source code to see if that would compile and narrowed the difference down to the <code>GLFW_OPENGL_VERSION_MINOR</code> variable.</p>
  
  <p>The program compiles and runs fine if minor is set to 2 or 3 but not if it's set to 1. Is this a bug in GLFW or is there something interesting going on here?</p>
  
  <p>Line 487 of the window.c in glfw source says:</p>
  
  <pre><code>if( wndconfig.glProfile &amp;&amp;
      ( wndconfig.glMajor &lt; 3 || ( wndconfig.glMajor == 3 &amp;&amp; wndconfig.glMinor &lt; 2 ) ) )
  {
      // Context profiles are only defined for OpenGL version 3.2 and above
      return GL_FALSE;
  }
  </code></pre>
  
  <p>If this is the cause (And it looks like it is) what exactly does this mean and why does it stop the window from being created?</p>