title: Passing uint attribute to GLSL
body: <p>I'm trying to pass a bunch of consecutive unsigned ints as attribute to my GLSL shader.</p>
  
  <p>So far I came up with</p>
  
  <pre><code>s_number = glGetAttribLocation(shader, "number");
  
  numberData = new GLuint[dotAmount];
  for (GLuint i = 0; i &lt; dotAmount; i++) {
      numberData[i] = i;
  }
  
  glGenBuffers(1, &amp;vertBuf);
  glBindBuffer(GL_ARRAY_BUFFER, vertBuf);
  
  glBufferData(
          GL_ARRAY_BUFFER,
          sizeof(dotAmount),
          numberData,
          GL_STATIC_DRAW
  );
  </code></pre>
  
  <p>The rendering function is</p>
  
  <pre><code>glUseProgram(shader);
  
  [..]
  
  glEnableVertexAttribArray(s_number);
  glBindBuffer(GL_ARRAY_BUFFER, vertBuf);
  
  glVertexAttribPointer(
          s_number,
          1,
          GL_UNSIGNED_INT,
          GL_FALSE,
          0,
          BUFFER_OFFSET(0)
  );
  
  glDrawArrays(GL_POINTS, 0, dotAmount);
  </code></pre>
  
  <p>I try to use the number in the vertex shader like this:</p>
  
  <pre><code>attribute uint number;
  </code></pre>
  
  <p>(The name 'vertBuf' is actually a bit misleading since it's not vertex data I want to pass)
  I'm using OpenGL 3 and shader versions 1.3.</p>
  
  <p>What I am trying to achieve is, I want the shaders to be executed <code>dotAmount</code> times. The positioning is done mathematically within the shader. But all I get is a blank screen...</p>
  
  <p>I am quite sure that the problem does not lie in the shaders. I want to draw points, and if I put <code>gl_Position = vec4(0.0, 0.0, 0.0, 0.0);</code> in the vertex shader, I assume it should draw something.</p>