title: OpenGL core profile not available despite glxinfo asserting is available
body: <p>I'm running: FreeBSD 12.2-RELEASE and I have a ThinkPad x230 which I think it has an Intel HD 4000 GPU. I'm trying to run GLSL 4.20 with the core profile. When I run my program (written in C) I get:</p>
  <pre><code>Error - 0:1(10): error: GLSL 4.20 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
  </code></pre>
  <p>However if I run the <code>glxinfo</code> command I get (among other information) this:</p>
  <pre><code>OpenGL vendor string: Intel Open Source Technology Center
  OpenGL renderer string: Mesa DRI Intel(R) Ivybridge Mobile 
  OpenGL core profile version string: 4.2 (Core Profile) Mesa 19.0.8
  OpenGL core profile shading language version string: 4.20
  OpenGL core profile context flags: (none)
  OpenGL core profile profile mask: core profile
  OpenGL core profile extensions:
      GL_3DFX_texture_compression_FXT1, GL_AMD_conservative_depth, 
      GL_AMD_draw_buffers_blend, GL_AMD_multi_draw_indirect, 
      GL_AMD_seamless_cubemap_per_texture, GL_AMD_shader_trinary_minmax, 
      GL_AMD_texture_texture4, GL_AMD_vertex_shader_layer, 
      GL_AMD_vertex_shader_viewport_index, GL_ANGLE_texture_compression_dxt3, 
      GL_ANGLE_texture_compression_dxt5, GL_APPLE_object_purgeable, 
      GL_ARB_ES2_compatibility, GL_ARB_ES3_compatibility,
      ...
  </code></pre>
  <p>I've trimmed the above output as it is very extense. Moreover this Wikipedia <a href="https://en.wikipedia.org/wiki/Intel_Graphics_Technology" rel="nofollow noreferrer">link</a> also asserts that OpenGL 4.20 is indeed supported by the GPU (though it refers only to GNU/Linux and Windows platforms). So I'm really puzzled if OpenGL 4.20 is supported or not in my system. Am I missing something or <code>glxinfo</code> is not being accurate?</p>
  <p>Also when I run <code>glxgears -info</code> I get (full output also trimmed):</p>
  <pre><code>Running synchronized to the vertical refresh.  The framerate should be
  approximately the same as the monitor refresh rate.
  GL_RENDERER   = Mesa DRI Intel(R) Ivybridge Mobile 
  GL_VERSION    = 3.0 Mesa 19.0.8
  GL_VENDOR     = Intel Open Source Technology Center
  ...
  </code></pre>
  <p>And then if I set <code>#version 300 core</code> both in my vertex and fragment shaders the same error pops up:</p>
  <pre><code>Error - 0:1(10): error: GLSL 3.00 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
  </code></pre>
  <p>This error pops up when I'm compiling my shaders in the program. I'm using OpenGL through <code>GLFW3</code> with <code>GLAD</code> set to OpenGL version 4.20 and core profile from <a href="https://glad.dav1d.de/" rel="nofollow noreferrer">here</a>. Any suggestions are more than welcome.</p>
  <p>I'm editing my question adding the initialization code that I'm running:</p>
  <pre class="lang-c prettyprint-override"><code>struct GameContext* new_game_context(size_t width, size_t height) {
      printf(&quot;[GameContext] new_game_context.\n&quot;);
      struct GameContext* game_context = calloc(1, sizeof(struct GameContext));
  
      abort_on(&amp;null_pointer, (void*) game_context, GAME_CONTEXT_INSUFFICIENT_MEMORY);
  
      game_context-&gt;keyboard = new_keyboard();
      game_context-&gt;window = 0;
      game_context-&gt;quit_game = false;
  
      glfwInit();
      glfwWindowHint(GLFW_RESIZABLE, GLFW_FALSE);
  
      game_context-&gt;window = glfwCreateWindow(width, height, &quot;Test&quot;, 0, 0);
  
      abort_on(&amp;null_pointer, (void*) game_context-&gt;window, GAME_CONTEXT_GLFW_WINDOW_ERROR);
  
      glfwMakeContextCurrent(game_context-&gt;window);
  
      if (!gladLoadGLLoader((GLADloadproc) glfwGetProcAddress))
          abort_on(&amp;always, NULL, GAME_CONTEXT_GLAD_ERROR);
  
      glfwSwapInterval(1);
      glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
      glEnable(GL_BLEND);
      glEnable(GL_LINE_SMOOTH);
      glLineWidth(GAME_CONTEXT_LINE_WIDTH);
      glfwSetKeyCallback(game_context-&gt;window, (GLFWkeyfun) handle_keyboard_event);
      glfwSetWindowUserPointer(game_context-&gt;window, (void*) game_context-&gt;keyboard);
  
      game_context-&gt;game_objects = create_game_objects();
  
      return game_context;
  }
  </code></pre>