上QQ阅读APP看书,第一时间看更新
Associating Attributes to VBOs
Once we have created the VBOs, we need to associate these buffers to vertex shader attributes. Each vertex shader attribute will refer to one and only one buffer, depending on the correspondence that is established, as shown in the following diagram:
We can achieve this by following these steps:
- Bind a VBO
- Point an attribute to the currently-bound VBO
- Enable the attribute
- Unbind
Let's take a look at the first step.