Name | Type | Description |
---|---|---|
renderer |
WebGLRenderer |
The renderer this System works for. |
Implements
Members
true
if has ANGLE_instanced_arrays
extension.
true
if we has *_vertex_array_object
extension.
Methods
Binds geometry so that is can be drawn. Creating a Vao if required
Name | Type | Attributes | Description |
---|---|---|---|
geometry |
Geometry |
<optional> |
Instance of geometry to bind. |
program |
GlProgram |
<optional> |
Instance of program to use vao for. |
Dispose all WebGL resources of all managed geometries.
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
contextLost |
boolean |
<optional> |
false |
If context was lost, we suppress |
Draws the currently bound geometry.
Name | Type | Attributes | Description |
---|---|---|---|
topology |
Topology |
<optional> |
The type primitive to render. |
size |
number |
<optional> |
The number of elements to be rendered. If not specified, all vertices after the starting vertex will be drawn. |
start |
number |
<optional> |
The starting vertex in the geometry to start drawing from. If not specified, drawing will start from the first vertex. |
instanceCount |
number |
<optional> |
The number of instances of the set of elements to execute. If not specified, all instances will be drawn. |
Returns:
Type | Description |
---|---|
this |
Reset and unbind any active VAO and geometry.
Update buffers of the currently bound geometry.
Activate vertex array object.
Name | Type | Description |
---|---|---|
geometry |
Geometry |
Geometry instance. |
program |
GlProgram |
Shader program instance. |
Check compatibility between a geometry and a program
Name | Type | Description |
---|---|---|
geometry |
Geometry |
Geometry instance. |
program |
GlProgram |
Program instance. |
Sets up the renderer context and necessary buffers.
Takes a geometry and program and generates a unique signature for them.
Name | Type | Description |
---|---|---|
geometry |
Geometry |
To get signature from. |
program |
GlProgram |
To test geometry against. |
Returns:
Type | Description |
---|---|
string |
|
Creates or gets Vao with the same structure as the geometry and stores it on the geometry. If vao is created, it is bound automatically. We use a shader to infer what and how to set up the attribute locations.
Name | Type | Default | Description |
---|---|---|---|
geometry |
Geometry |
Instance of geometry to to generate Vao for. |
|
program |
GlProgram | ||
_incRefCount |
boolean | true |
Increment refCount of all geometry buffers. |
Returns:
Type | Description |
---|---|
WebGLVertexArrayObject |
Disposes geometry.
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
geometry |
Geometry |
Geometry with buffers. Only VAO will be disposed |
||
contextLost |
boolean |
<optional> |
false |
If context was lost, we suppress deleteVertexArray |
Unbind/reset everything.