<p>The usage flag in BufferData was basically useless. There is no functional difference between each value and drivers used other ways to decide how to handle its data.</p>

<p>The <code>flags</code> parameter on the other hand actually changes what you can do with the buffer.</p>

CC BY-SA 3.0
2017-09-01T08:15:20.380Z
2017-09-01T08:15:20.380Z
ratchet freak
<p>In <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glBufferStorage.xhtml" rel="nofollow noreferrer">the documentation</a> I see that the final parameter for <code>glNamedBufferStorage</code> is <code>flags</code> and that <code>flags</code>:</p>

<blockquote>
  <p>Specifies the intended usage of the buffer's data store. Must be a bitwise combination of the following flags. GL_DYNAMIC_STORAGE_BIT, GL_MAP_READ_BIT GL_MAP_WRITE_BIT, GL_MAP_PERSISTENT_BIT, GL_MAP_COHERENT_BIT, and GL_CLIENT_STORAGE_BIT.</p>
</blockquote>

<p>However, in the older <code>glBufferData</code> we use to specify a <code>usage</code> flag which would include things such as <code>GL_STATIC_DRAW</code> to specify expected usage patterns.</p>

<p>Where do we include that with the newer OpenGL?</p>

<opengl>
How to set flags and usage glnamedBufferStorage in new OpenGL 4.4+ (GL_STATIC_DRAW)?
Startec
# How to set flags and usage glnamedBufferStorage in new OpenGL 4.4+ (GL_STATIC_DRAW)?

(Asked by: username_0 on 2017-09-01)

In [the documentation](https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glBufferStorage.xhtml) I see that the final parameter for `glNamedBufferStorage` is `flags` and that `flags`:

> Specifies the intended usage of the buffer's data store. Must be a bitwise combination of the following flags. GL\_DYNAMIC\_STORAGE\_BIT, GL\_MAP\_READ\_BIT GL\_MAP\_WRITE\_BIT, GL\_MAP\_PERSISTENT\_BIT, GL\_MAP\_COHERENT\_BIT, and GL\_CLIENT\_STORAGE\_BIT.

However, in the older `glBufferData` we use to specify a `usage` flag which would include things such as `GL_STATIC_DRAW` to specify expected usage patterns.

Where do we include that with the newer OpenGL?

**Tags:** opengl


---

## 1 answers

### Answer by username_1 on 2017-09-01. Score: 2 | Accepted answer

The usage flag in BufferData was basically useless. There is no functional difference between each value and drivers used other ways to decide how to handle its data.

The `flags` parameter on the other hand actually changes what you can do with the buffer.


---

