title: VBO wont draw, large dataset
body: <p>I am trying to render a large dataset of ~100 000 values in OpenGL, right now only as points, later using sprites. </p>
  
  <p>My vector <code>"positions"</code> is ordered like this: 
  <code>
  +-------------------------------------------------
  | x | y | z | w | x | y | z | w | x | y | z | ... 
  +-------------------------------------------------
  </code>
  where the fourth component (w) is a scaling factor that is used in the vertex/fragment shaders..  </p>
  
  <p><strong>VBO creation [ EDIT ]</strong></p>
  
  <pre><code>...
  v_size = positions.size();
  GLint positionAttrib = _programObject-&gt;attributeLocation("in_position");
  
  glGenVertexArrays(1, &amp;_vaoID);
  glGenBuffers(1, &amp;_vboID);
  
  glBindVertexArray(_vaoID);
  
  glBindBuffer(GL_ARRAY_BUFFER, _vboID);
  glBufferData(GL_ARRAY_BUFFER, v_size*sizeof(GLfloat), &amp;positions[0], GL_STATIC_DRAW);
  
  glEnableVertexAttribArray(positionAttrib);
  glVertexAttribPointer(positionAttrib, 4, GL_FLOAT, GL_FALSE, 4*sizeof(GLfloat), 0 );
  glBindVertexArray(0);
  </code></pre>
  
  <p><strong>Render-stage: [ EDIT ]</strong></p>
  
  <p>This works now, but I am not sure if 100% correct, feel free to criticize:</p>
  
  <pre><code>GLint vertsToDraw = v_size / 4;
  GLint positionAttrib = _programObject-&gt;attributeLocation("in_position");
  // edit 1. added vao bind
  glBindVertexArray(_vaoID); 
  glEnableVertexAttribArray(positionAttrib);     
      glBindBuffer(GL_ARRAY_BUFFER, _vboID);
      //glVertexAttribPointer(positionAttrib, 4, GL_FLOAT, GL_FALSE, 4*sizeof(GLfloat), (void*)0);
      // edit 2. no stride
      glVertexAttribPointer(positionAttrib, 4, GL_FLOAT, GL_FALSE, 0, (void*)0); 
      glDrawArrays(GL_POINTS, 0, vertsToDraw);
  glDisableVertexAttribArray(positionAttrib);
  glBindVertexArray(0);
  </code></pre>
  
  <p>Please let me know if any more code is needed.  </p>