title: OpenGL points drawn disappear, draw call and swap buffer issue?
body: <p>I am wanting to draw points on screen from the vertex data already sent to the GPU using GL_POINTS. At the moment they are drawn for a split second and then disappear. I am using a time-dependent loop as I want the points to appear sequentially...</p>
  
  <pre><code>if (currentTime &gt; insertionRateTime)
  {
      cout &lt;&lt; "insertionRateTime = " &lt;&lt; insertionRateTime &lt;&lt; "index" &lt;&lt; index &lt;&lt; endl;
      insertionRateTime += insertionRate;
      glDrawArrays(GL_POINTS, index, 1); 
      index += 1;
  }
  
  glfwSwapBuffers(window);
  glfwPollEvents();
  </code></pre>
  
  <p>Can anybody shed any light here? If I place the glDrawArrays outside of the if statement then the points drawn remain until the next point is drawn :(</p>