title: OpenGL: Passing random positions to the Vertex Shader
body: <p>I am starting to learn OpenGL (3.3+), and now I am trying to do an algorithm that draws 10000 points randomly in the screen.
  The problem is that I don't know exactly where to do the algorithm. Since they are random, I can't declare them on a VBO (or can I?), so I was thinking in passing a uniform value to the vertex shader with the varying position (I would do a loop changing the uniform value). Then I would do the operation 10000 times. I would also pass a random color value to the shader.</p>
  
  <p>Here is kind of my though:</p>
  
  <pre><code>#version 330 core
  
  uniform vec3 random_position;
  uniform vec3 random_color;
  
  out vec3 Color;
  
  void main() {
      gl_Position = random_position;
      Color = random_color;
  }
  </code></pre>
  
  <p>In this way I would do the calculations outside the shaders, and just pass them through the uniforms, but I think a better way would be doing this calculations inside the vertex shader. Would that be right? </p>