new PIXI.GeometrySystem (renderer) overrides
| Name | Type | Description |
|---|---|---|
renderer |
PIXI.Renderer |
The renderer this System works for. |
Extends
Implements
Members
true if support gl.UNSIGNED_INT in gl.drawElements or gl.drawElementsInstanced
- Default Value:
- false
true if has ANGLE_instanced_arrays extension
- Default Value:
- true
true if we has *_vertex_array_object extension
- Default Value:
- true
Cache for all geometries by id, used in case renderer gets destroyed or for profiling
Methods
Binds geometry so that is can be drawn. Creating a Vao if required
| Name | Type | Attributes | Description |
|---|---|---|---|
geometry |
PIXI.Geometry |
<optional> |
instance of geometry to bind |
shader |
PIXI.Shader |
<optional> |
instance of shader 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 |
Disposes geometry
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
geometry |
PIXI.Geometry |
Geometry with buffers. Only VAO will be disposed |
||
contextLost |
boolean |
<optional> |
false |
If context was lost, we suppress deleteVertexArray |
Draw the geometry
| Name | Type | Attributes | Description |
|---|---|---|---|
type |
Number |
the type primitive to render |
|
size |
Number |
<optional> |
the number of elements to be rendered |
start |
Number |
<optional> |
Starting index |
instanceCount |
Number |
<optional> |
the number of instances of the set of elements to execute |
Returns:
| Type | Description |
|---|---|
| this |
Reset and unbind any active VAO and geometry
Activate vertex array object
| Name | Type | Description |
|---|---|---|
geometry |
PIXI.Geometry |
Geometry instance |
program |
PIXI.Program |
Shader program instance |
Check compatibility between a geometry and a program
| Name | Type | Description |
|---|---|---|
geometry |
PIXI.Geometry |
Geometry instance |
program |
PIXI.Program |
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 |
PIXI.Geometry |
to get signature from |
program |
PIXI.Program |
to test geometry against |
Returns:
| Type | Description |
|---|---|
| String | Unique signature of the geometry and program |
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 | Attributes | Default | Description |
|---|---|---|---|---|
geometry |
PIXI.Geometry |
Instance of geometry to to generate Vao for |
||
shader |
PIXI.Shader |
Instance of the shader |
||
incRefCount |
boolean |
<optional> |
false |
Increment refCount of all geometry buffers |
Returns:
| Type | Description |
|---|---|
| WebGLVertexArrayObject |
Unbind/reset everything
Update buffers
Inherited Properties
From class PIXI.System
renderer Renderer inherited
Reference to the main renderer
Inherited Methods
From class PIXI.System
destroy () void inherited
Destroy and don't use after this.