Constructor
new Buffer(locationName, data, rows, cols, target, type, divisor, dataType)
Creates an instance of Buffer.
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
locationName |
string | Attribute/uniform location name | |
data |
TypedArray | number | Data or length of data | |
rows |
number | 1 | Number of rows - default 1 |
cols |
number | 1 | Number of columns - default 1 |
target |
number | Buffer target - default ARRAY_BUFFER | |
type |
number | Buffer type - default DYNAMIC_DRAW | |
divisor |
number | 1 | Attribute divisor - default 1 |
dataType |
number | Data type - default FLOAT |
Properties:
| Name | Type | Description |
|---|---|---|
data |
any |
- Source:
Classes
Methods
bind(gl)
binf buffer
Parameters:
| Name | Type | Description |
|---|---|---|
gl |
WebGLContext |
- Source:
create(gl, locations)
Create and binf buffer
Parameters:
| Name | Type | Description |
|---|---|---|
gl |
WebGLContext | |
locations |
Object |
- Source:
destruct()
Destruct class
- Source:
upload(gl)
Upload buffer
Parameters:
| Name | Type | Description |
|---|---|---|
gl |
WebGLContext |
- Source:
Extensions