glBufferStorage

creates and initializes a buffer object's immutable data store

Signature

glBufferStorage( GLenum ( target ) , GLsizeiptr ( size ) , const GLvoid * ( data ) , GLbitfield ( flags ) )-> void
glBufferStorage( target , size , data , flags )

Parameters

VariablesDescription
target
Specifies the target buffer object. The symbolic constant must be GL_ARRAY_BUFFER , GL_ATOMIC_COUNTER_BUFFER , GL_COPY_READ_BUFFER , GL_COPY_WRITE_BUFFER , GL_DRAW_INDIRECT_BUFFER , GL_DISPATCH_INDIRECT_BUFFER , GL_ELEMENT_ARRAY_BUFFER , GL_PIXEL_PACK_BUFFER , GL_PIXEL_UNPACK_BUFFER , GL_QUERY_BUFFER , GL_SHADER_STORAGE_BUFFER , GL_TEXTURE_BUFFER , GL_TRANSFORM_FEEDBACK_BUFFER , or GL_UNIFORM_BUFFER .
size
Specifies the size in bytes of the buffer object's new data store.
data
Specifies a pointer to data that will be copied into the data store for initialization, or NULL if no data is to be copied.
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 .