PrimitiveCompositor
class PrimitiveCompositor extends Compositor
A WebGL Compositor object. This class handles all of the WebGL state
Pushes texture regions or shape geometry into WebGL buffers, automatically flushes to GPU
Constructor
new PrimitiveCompositor() → {}
Summary
Methods from PrimitiveCompositor
|
Properties inherited from Compositor
Array<Object> |
|
GLShader |
|
GLShader |
|
number |
|
number |
|
VertexArrayBuffer |
|
number |
|
Methods inherited from Compositor
|
|
called by the WebGL renderer when a compositor become the current one |
|
|
|
|
|
|
Public Methods
drawVertices(mode: GLenum, verts: Array<Point>, vertexCount: number) → {}
Draw an array of vertices
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
mode | GLenum |
primitive type to render (gl.POINTS, gl.LINE_STRIP, gl.LINE_LOOP, gl.LINES, gl.TRIANGLE_STRIP, gl.TRIANGLE_FAN, gl.TRIANGLES) |
||
verts | Array<Point> |
an array of vertices |
||
vertexCount | number |
<optional> |
verts.length |
amount of points defined in the points array |