title: How do I utilize a different OpenGL profile?
body: <p>I would like to replicate tutorials (sprite rendering), that use OpenGL version >= 3.3.</p>
  
  <p>Geometry shaders for example were introduced in 3.2, and I get this error:</p>
  
  <pre><code>error: ‘GL_GEOMETRY_SHADER’ was not declared in this scope
  </code></pre>
  
  <p>I updated my mesa driver to the latest; I don't really understand though, how I can choose a newer version of OpenGL when compiling/linking in c++:</p>
  
  <p>➜ glxinfo | grep -i "version"       </p>
  
  <pre><code>server glx version string: 1.4
  client glx version string: 1.4
  GLX version: 1.4
      Version: 17.1.4
      Max core profile version: 4.5
      Max compat profile version: 3.0
      Max GLES1 profile version: 1.1
      Max GLES[23] profile version: 3.1
  OpenGL core profile version string: 4.5 (Core Profile) Mesa 17.1.4
  OpenGL core profile shading language version string: 4.50
  OpenGL version string: 3.0 Mesa 17.1.4
  OpenGL shading language version string: 1.30
  OpenGL ES profile version string: OpenGL ES 3.1 Mesa 17.1.4
  OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10
  </code></pre>
  
  <p>I cannot really interpret this, but it says there is some kind of core profile using version 4.5. How do I utilize this profile?</p>
  
  <p>I initialize the GL context in my code like this:</p>
  
  <pre><code>if(!glfwInit()) e_glfw_init();
  m_window = glfwCreateWindow(WINDOW_WIDTH, WINDOW_HEIGHT, WINDOW_TITLE.c_str(), nullptr, nullptr);
  if(m_window == nullptr) e_window_context();
  glfwMakeContextCurrent(m_window);
  glewExperimental = true;
  if(glewInit() != GLEW_OK) e_glew_init();
  </code></pre>