glNamedBufferStorage

glBufferStorage: man4/glBufferStorage.xml

glBufferStorage and glNamedBufferStorage create a new immutable data store. For glBufferStorage, the buffer object currently bound to target will be initialized. For glNamedBufferStorage, buffer is the name of the buffer object that will be configured. The size of the data store is specified by size. If an initial data is available, its address may be supplied in data. Otherwise, to create an uninitialized data store, data should be null. The flags parameters specifies the intended usage of the buffer's data store. It must be a bitwise combination of a subset of the following flags: The allowed combinations of flags are subject to certain restrictions. They are as follows:

  1. If flags contains GL_MAP_PERSISTENT_BIT, it must also contain at least one of GL_MAP_READ_BIT or GL_MAP_WRITE_BIT.
  2. If flags contains GL_MAP_COHERENT_BIT, it must also contain GL_MAP_PERSISTENT_BIT.

glBufferStorage is available only if the GL version is 4.4 or greater. glNamedBufferStorage is available only if the GL version is 4.5 or greater. If data is null, a data store of the specified size is still created, but its contents remain uninitialized and thus undefined.

@OpenGL_Version(OGLIntroducedIn.V4P5)
@OpenGL_Extension("GL_ARB_direct_state_access")
fn_glNamedBufferStorage glNamedBufferStorage;

See Also

glBindBuffer, glBufferSubData, glMapBuffer, glUnmapBuffer

Meta