For example, if you want to have a buffer store the results of a vertex shader computation through the use of transform feedback, the user is not directly changing the buffer information. Similarly, the user can read a buffer's data, using a variety of commands.Or, the user can execute an Open GL command that causes the GL to read the contents of the buffer and do something based on it.One way is for the user to explicitly upload some binary data.The other way is for the user to issue GL commands that cause the buffer to be filled in.There are two ways to allocate storage for buffer objects: mutable or immutable.Allocating immutable storage for a buffer changes the nature of how you can interact with the buffer object.
Pure in-Open GL buffers: Sometimes, it is useful to have a buffer object that is owned almost entirely by Open GL processes.Buffers storing vertex data are read by the GL when rendering.There are three hints that the user can specify the data.Buffer Objects are Open GL Objects that store an array of unformatted memory allocated by the Open GL context (AKA the GPU).These can be used to store vertex data, pixel data retrieved from images or the framebuffer, and a variety of other things. These use the standard Gen/Delete paradigm as most Open GL objects.You may still invalidate it with an explicit invalidation command or through mapping the buffer. Open GL will copy that data into the buffer object upon initialization.You may pass NULL for this parameter; if you do, the initial contents of the buffer will be undefined.Without this flag, attempting to perform any operation on the buffer while it is mapped will fail.You must use one of the mapping bits when using this bit.The contents of the buffer are written by Compute Shaders, Transform Feedback, or various other mechanisms.And other Open GL processes read from them, such as via Indirect Rendering, Vertex Specification, and so forth.