OpenGL Objects are structures composed of states and data and are responsible for transmitting data from the CPU to the GPU. OpenGL objects must first be created and bound before they can be used.
There are several types of OpenGL Objects. For example, a Vertex Buffer Object can store vertices of a character. Whereas a Texture, another kind of OpenGL Object, can store image data.
OpenGL objects can be classified as: Regular Objects or Container Objects:
These type of objects contain data. A list of regular objects are:
- Buffer Objects
- Renderbuffer Objects
- Texture Objects
- Query Objects
- Sampler Objects
As the name implies, these type of objects do not contain any data. Instead they are containers for regular OpenGL objects. A list of container objects are:
- Framebuffer Objects
- Vertex Array Objects
- Transform Feedback Objects
- Program Pipeline Objects
Now, before an OpenGL object can be used, it must be created and bound to the OpenGL context.
When you bind an OpenGL object to the OpenGL Context, you must specified what kind of data the object will transport to the GPU. The type of data that the OpenGL Object transports defines its behavior.
A Binding Point specifies the behavior of the OpenGL object. Binding Points, also known as Targets, allows OpenGL objects to be used for different purposes.
The most common binding points are:
For example, when a buffer object's binding point is GL_ARRAY_BUFFER, it behaves as a Vertex Buffer Object. This type of objects are mainly used to store vertex data of characters.
If interested, here is a complete list of Binding points: