glMapBuffer
glMapBuffer is an OpenGL API function that maps the data store of a bound buffer object into the client's address space. By obtaining a pointer to the buffer’s memory, applications can read or modify the buffer contents directly without issuing subdata calls. The mapping is performed for the entire data store of the bound buffer object.
To use glMapBuffer, a buffer object must be bound to a target such as GL_ARRAY_BUFFER, GL_ELEMENT_ARRAY_BUFFER,
The function returns a pointer to the mapped memory. If mapping fails, a NULL pointer is returned,
glMapBuffer is related to glMapBufferRange, which provides more granular control by allowing mapping of a subrange
Notes and caveats: mapping can incur performance costs due to synchronization with the GPU, and the mapped