This will hook onto the renderer's contextChange
and prerender
signals.
The renderer this works for.
Readonly
maxMaximum number of textures that can be uploaded to
the GPU under the current context. It is initialized
properly in this.contextChange
.
PIXI.BatchRenderer#contextChange
The number of bufferable objects before a flush occurs automatically.
PIXI.BatchRenderer.defaultBatchSize * 4
Readonly
stateThe WebGL state in which this renderer will work.
Static
_drawPool of BatchDrawCall
objects that flush
used
to create "batches" of the objects being rendered.
These are never re-allocated again. Shared between all batch renderers because it can be only one "flush" working at the moment.
Static
_texturePool of BatchDrawCall
objects that flush
used
to create "batches" of the objects being rendered.
These are never re-allocated again. Shared between all batch renderers because it can be only one "flush" working at the moment.
Static
defaultThe default sprite batch size.
The default aims to balance desktop and mobile devices.
PIXI.BatchRenderer#maxTextures
since 7.1.0
Static
canCan we upload the same buffer in a single frame?
Static
defaultThe default fragment shader source
Static
defaultThe maximum textures that this device supports.
32
Static
defaultThe default vertex shader source
Bind textures for current rendering
Populating drawcalls for rendering
Fetches an attribute buffer from this._aBuffers
that can hold atleast size
floats.
minimum capacity required
size
floatsTakes the four batching parameters of element
, interleaves
and pushes them into the batching attribute/index buffers given.
It uses these properties: vertexData
uvs
, textureId
and
indicies
. It also uses the "tint" of the base-texture, if
present.
element being rendered
attribute buffer.
index buffer
number of floats already in the attribute buffer
number of indices already in indexBuffer
Buffers the "batchable" object. It need not be rendered immediately.
the element to render when using this renderer
Generated using TypeDoc
Renderer dedicated to drawing and batching sprites.
This is the default batch renderer. It buffers objects with texture-based geometries and renders them in batches. It uploads multiple textures to the GPU to reduce to the number of draw calls.
Memberof
PIXI