title: GLSL shader version 4.30 not supported
body: <p>I have an Intel HD4400 graphics card in my laptop. When I run glxinfo | grep "OpenGL", I get</p>
  
  <pre><code>OpenGL vendor string: Intel Open Source Technology Center
  OpenGL renderer string: Mesa DRI Intel(R) Haswell Mobile 
  OpenGL core profile version string: 4.5 (Core Profile) Mesa 18.0.0-rc5
  OpenGL core profile shading language version string: 4.50
  OpenGL core profile context flags: (none)
  OpenGL core profile profile mask: core profile
  OpenGL core profile extensions:
  OpenGL version string: 3.0 Mesa 18.0.0-rc5
  OpenGL shading language version string: 1.30
  OpenGL context flags: (none)
  OpenGL extensions:
  OpenGL ES profile version string: OpenGL ES 3.1 Mesa 18.0.0-rc5
  OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10
  OpenGL ES profile extensions:
  </code></pre>
  
  <p>This should mean that my graphics card can support GLSL version 4.30, right? However, my shader compilation fails with the following message</p>
  
  <pre><code>error: GLSL 4.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, 3.00 ES, and 3.10 ES
  </code></pre>
  
  <p>In my code, I do set the context profile to core, with the following statement</p>
  
  <pre><code>SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE)
  </code></pre>
  
  <p>after which I set the context major and minor versions to 4 and 3, respectively.</p>
  
  <p>Any ideas? I am on Ubuntu 18.04. I thought it might be the graphics drivers that are not up to date, but if they are not up to date, then would glxinfo still tell me that version 4.50 is supported? It also seems like Ubuntu has the latest Intel graphics drivers installed already, and I do not want to risk installing graphics drivers that might break my display.</p>
  
  <p><strong>Additional Info:</strong></p>
  
  <p><strong>I ran this exact code on another machine</strong>, and it worked perfectly (and I am quite sure that that machine does not support GL 4.3 compatible). I therefore do not believe that it is the way I created my context. Here is the code where I set my profile context version:</p>
  
  <pre><code>void set_gl_attribs()
  {   
      if (SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE))
      {
          cout &lt;&lt; "Could not set core profile" &lt;&lt; endl;
      }
      if (SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 4))
      {
          cout &lt;&lt; "Could not set GL major version" &lt;&lt; endl;
      }
      if (SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 3))
      {
          cout &lt;&lt; "Could not set GL minor version" &lt;&lt; endl;
      }
  }
  </code></pre>
  
  <p>And <em>this is <strong>where</strong> I call the code</em> (<em>before</em> I call any other SDL or OpenGL functions): </p>
  
  <pre><code>SDL_Init(SDL_INIT_EVERYTHING);
  
  window = SDL_CreateWindow("Sphere", 100, 100, width, height, SDL_WINDOW_OPENGL);
  gl_context = SDL_GL_CreateContext(window);
  //SDL_HideWindow(window);
  
  set_gl_attribs();  // where I set the context, as shown above
  SDL_GL_SetSwapInterval(1);
  
  glewExperimental = GL_TRUE;
  GLuint glew_return = glewInit();
  </code></pre>