Constructor
new IndexBuffer(arg, options)
Instantiates an IndexBuffer object.
- Source:
Parameters:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
arg |
WebGLBuffer
|
Uint8Array
|
Uint16Array
|
Uin32Array
|
Array
|
Number
|
The index data to buffer. | ||||||||||||
options |
Object
|
The rendering options.
|
Methods
bufferData(arg) → {IndexBuffer}
Upload index data to the GPU.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
arg |
Array
|
ArrayBuffer
|
ArrayBufferView
|
number
|
The array of data to buffer. |
bufferSubData(array, byteOffset) → {IndexBuffer}
Upload partial index data to the GPU.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
array |
Array
|
ArrayBuffer
|
ArrayBufferView
|
The array of data to buffer. |
byteOffset |
number
|
The byte offset at which to buffer. |
draw(options) → {IndexBuffer}
Execute the draw command for the bound buffer.
- Source:
Parameters:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object
|
The options to pass to 'drawElements'. Optional.
|