title: GLSL Uniform layout binding and textures
body: <p>I'm a bit confused on what would be the right way to bind the texture when uniforms are using the layout binding.</p>
  
  <pre><code>layout(binding = 0, std140) uniform uCommon
  {
      mat4 projectionMatrix;
      mat4 viewMatrix;
  };
  
  layout(binding = 1, std140) uniform uModel
  {
      mat4 modelViewProjectionMatrix;
  };
  
  layout(binding = 3) uniform sampler2D uTexture;
  </code></pre>
  
  <p>To bind my first texture I should use "GL_TEXTURE0 + 3"?</p>
  
  <pre><code>glActiveTexture(GL_TEXTURE0 + 3);
  glBindTexture(GL_TEXTURE_2D, textureId);
  </code></pre>
  
  <p>Is this the correct way?</p>
  
  <p><strong>EDIT:</strong> Or is sampler using a separate binding from other uniforms? Can I use:</p>
  
  <pre><code>layout(binding = 0) uniform sampler2D uTexture;
  </code></pre>
  
  <p>while still using</p>
  
  <pre><code>layout(binding = 0, std140) uniform uCommon
  </code></pre>