title: GtkGLArea: GL_ARB_create_context_profile extension not found
body: <p>I'm trying to get GTK+ 3.16's new GLArea widget to work. It is intended to provide built-in OpenGL support w/o relying on the outdated GtkGLExt/GtkGLArea projects. Since I'm not willing to update my working distribution to Gnome 3.16 just yet, I installed Fedora 22 Alpha on a virtual machine using Gnome Boxes.</p>
  
  <p>Following <a href="https://www.bassi.io/articles/2015/02/17/using-opengl-with-gtk/" rel="nofollow">ebassi's blog post</a> I added a GLArea child to my window UI file:</p>
  
  <pre><code>&lt;child&gt;
      &lt;object class="GtkGLArea" id="gl_drawing_area"&gt;
          &lt;signal name="realize" handler="gl_init" swapped="yes"/&gt;
          &lt;signal name="unrealize" handler="gl_fini" swapped="yes"/&gt;
          &lt;signal name="render" handler="gl_draw" swapped="yes"/&gt;
          &lt;property name="visible"&gt;True&lt;/property&gt;
          &lt;property name="can_focus"&gt;False&lt;/property&gt;
          &lt;property name="hexpand"&gt;True&lt;/property&gt;
          &lt;property name="vexpand"&gt;True&lt;/property&gt;
      &lt;/object&gt;
  &lt;/child&gt;
  </code></pre>
  
  <p>and connected the signals. I should say that I'm using Vala for my UI code. The actual OpenGL code is intended to go into a C function that I would call from the <code>gl_draw</code> Vala method. For now, the three Vala functions just print their names.</p>
  
  <p>Indeed, <code>gl_init</code> and <code>gl_fini</code> get called. But the GLArea widget displays this error message:</p>
  
  <blockquote>
    <p>The GLX_ARB_create_context_profile extension needed to create core profiles is not available</p>
  </blockquote>
  
  <p>I also tried to run ebassi's very own <a href="https://github.com/ebassi/glarea-example" rel="nofollow">example program (GitHub)</a>. It does not even display the UI but outputs</p>
  
  <blockquote>
    <p>glarea: Couldn't find current GLX or EGL context.</p>
  </blockquote>
  
  <p>on the terminal right away.</p>
  
  <p>However, running <code>glxinfo</code> tells me I got that extension installed:</p>
  
  <pre><code>name of display: :0
  display: :0  screen: 0
  direct rendering: Yes
  server glx vendor string: SGI
  server glx version string: 1.4
  server glx extensions:
      GLX_ARB_multisample, GLX_EXT_import_context, GLX_EXT_texture_from_pixmap, 
      GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_MESA_copy_sub_buffer, 
      GLX_OML_swap_method, GLX_SGIS_multisample, GLX_SGIX_fbconfig, 
      GLX_SGIX_pbuffer, GLX_SGI_make_current_read
  client glx vendor string: Mesa Project and SGI
  client glx version string: 1.4
  client glx extensions:
      GLX_ARB_create_context, GLX_ARB_create_context_profile, 
      GLX_ARB_create_context_robustness, GLX_ARB_fbconfig_float, 
      GLX_ARB_framebuffer_sRGB, GLX_ARB_get_proc_address, GLX_ARB_multisample, 
      GLX_EXT_buffer_age, GLX_EXT_create_context_es2_profile,
  ...
  </code></pre>
  
  <p><code>glxgears</code> also runs without problems.</p>
  
  <p>Moreover, I cloned the <a href="https://github.com/GNOME/gtkglarea" rel="nofollow">GNOME/gtkglarea repo in Github</a>, compiled it myself and ran the examples without any problems. <strike>I understand this project developed the GLArea widget before it was officially included in GTK?</strike> (I was wrong about this.)</p>