Low level shader typed array related functions
You should generally not need to use these functions. They are provided
for those cases where you're doing something out of the ordinary
and you need lower level access.
For backward compatibily they are available at both twgl.typedArray and twgl
itself
See module:twgl for core functions
Methods
(static) getGLTypeForTypedArray(typedArray) → {number}
Get the GL type for a typedArray
Parameters:
| Name | Type | Description |
|---|---|---|
typedArray |
ArrayBuffer | ArrayBufferView | a typedArray |
Returns:
the GL type for array. For example pass in an Int8Array and gl.BYTE will
be returned. Pass in a Uint32Array and gl.UNSIGNED_INT will be returned
- Type
- number
(static) getTypedArrayTypeForGLType(type) → {function}
Get the typed array constructor for a given GL type
Parameters:
| Name | Type | Description |
|---|---|---|
type |
number | the GL type. (eg: |
Returns:
the constructor for a the corresponding typed array. (eg. Uint32Array).
- Type
- function