title: glCreateShader gives same ID
body: <p><strong>Background :</strong> </p>
  
  <p>I have a Shader class in my c++/OpenGL3.1/GLSL/Qt program. My program uses several shaders based on different GLSL sources files.</p>
  
  <p>My application can run many different 3D renderers based on the QGLWidget implementation and each one creates its own shaders.</p>
  
  <p>When I create my first 3d renderer and initialize my shaders, shaders IDs are generated with the help of glCreateShader &amp; glCreateProgram, without any problem. </p>
  
  <p><strong>Problem :</strong> </p>
  
  <p>But when I create a second 3d renderer, the OGL functions retrieving the ID give exactly the same but I expect to have new ones. It means that my two renderers will send the data to the same GPU program...</p>
  
  <p>It's obvious that in the GPU program, uniform variables are mixed and when running the second renderer, the first one displays a weird rendering.</p>
  
  <p>Indeed, when I close one of the two renderer, all shaders are killed... and the second renderer cannot display anything.</p>
  
  <p><strong>Idea ?</strong> </p>
  
  <p>I'm completely lost and my logical deduction is that glCreateShader &amp; glCreateProgram give ID according to their own thread id. QGLWidget running probably its own thread to call the rendering functions, it may trouble the persistence...</p>
  
  <p>Any idea of how to solve this problem  ?</p>