title: Difference in glGenBuffers and glCreateBuffers
body: <p>Given we are using OpenGL 4.5 or have support for the <code>GL_ARB_direct_state_access</code> extension, we have the new function <a href="https://www.opengl.org/sdk/docs/man/html/glCreateBuffers.xhtml"><code>glCreateBuffers</code></a>.</p>
  
  <p>This function has an identical signature to <a href="https://www.opengl.org/sdk/docs/man/html/glGenBuffers.xhtml"><code>glGenBuffers</code></a>, but specifies:</p>
  
  <blockquote>
    <p>returns <code>n</code> previously unused buffer names in <code>buffers</code>, each representing a new buffer object initialized as if it had been bound to an unspecified target</p>
  </blockquote>
  
  <p><code>glGenBuffers</code> has the following specification:</p>
  
  <blockquote>
    <p>Buffer object names returned by a call to <code>glGenBuffers</code> are not returned by subsequent calls, unless they are first deleted with <code>glDeleteBuffers</code>.</p>
  </blockquote>
  
  <p>So any buffer name returned by <code>glCreateBuffers</code> will never be used again by itself, but could be used by <code>glGenBuffers</code>.</p>
  
  <p>It seems that <code>glCreateBuffers</code> will always create new buffer objects and return their names, and <code>glGenBuffers</code> will only create new buffers if there are no previous buffers that have since been deleted.</p>
  
  <p>What advantage does adding this function have?</p>
  
  <p>When should I use <code>glCreateBuffers</code> over <code>glGenBuffers</code>?</p>
  
  <hr>
  
  <p>P.S.<br>
  I think this stands for all <code>glCreate*</code> functions added by <code>GL_ARB_direct_state_access</code></p>