The operations to manipulate WebGL buffers are summarized in the following table:
Method | Description |
createBuffer() | Creates a new buffer. |
deleteBuffer(buffer) | Deletes the supplied buffer. |
bindBuffer(target, buffer) |
Binds a buffer object. The accepted values for target are as follows:
|
bufferData(target, data, type) |
Provides the buffer data. The accepted values for target are as follows:
As mentioned earlier, WebGL only accepts JavaScript typed arrays for the data. The parameter type is a performance hint for WebGL. The accepted values for type are as follows:
|