Real-Time 3D Graphics with WebGL 2
上QQ阅读APP看书,第一时间看更新

Enabling the Attribute

Finally, we need to activate the vertex shader attribute. Following our example, we just need to add gl.enableVertexAttribArray(positionAttributeLocation);.

The following diagram summarizes the mapping procedure: