Options
All
  • Public
  • Public/Protected
  • All
Menu

Class SpriteBatchRenderer

Hierarchy

  • AbstractBatchRenderer
    • SpriteBatchRenderer

Index

Constructors

constructor

Properties

MAX_TEXTURES

MAX_TEXTURES: number

Protected _aBuffers

_aBuffers: ViewableBuffer[]

Protected _aIndex

_aIndex: number

Protected _attributeBuffer

_attributeBuffer: ViewableBuffer

Protected _bufferSize

_bufferSize: number

Protected _bufferedElements

_bufferedElements: IBatchableElement[]

Protected _bufferedTextures

_bufferedTextures: BaseTexture<Resource, IAutoDetectOptions>[]

Protected _dcIndex

_dcIndex: number

Protected _flushId

_flushId: number

Protected _iBuffers

_iBuffers: Uint16Array[]

Protected _iIndex

_iIndex: number

Protected _indexBuffer

_indexBuffer: Uint16Array

Protected _indexCount

_indexCount: number

Protected _shader

_shader: Shader

Protected _tempBoundTextures

_tempBoundTextures: BaseTexture<Resource, IAutoDetectOptions>[]

Protected _vertexCount

_vertexCount: number

Protected geometryClass

geometryClass: typeof BatchGeometry

Protected renderer

renderer: Renderer

Protected shaderGenerator

shaderGenerator: BatchShaderGenerator

size

size: number

Readonly state

state: State

Protected vertexSize

vertexSize: number

Static _drawCallPool

_drawCallPool: BatchDrawCall[]

Pool 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
member

{PIXI.BatchDrawCall[]}

Static _textureArrayPool

_textureArrayPool: BatchTextureArray[]

Pool 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
member

{PIXI.BatchTextureArray[]}

Methods

bindAndClearTexArray

  • bindAndClearTexArray(texArray: BatchTextureArray): void
  • Bind textures for current rendering

    Parameters

    • texArray: BatchTextureArray

    Returns void

buildDrawCalls

  • buildDrawCalls(texArray: BatchTextureArray, start: number, finish: number): void
  • Populating drawcalls for rendering

    Parameters

    • texArray: BatchTextureArray
    • start: number
    • finish: number

    Returns void

buildTexturesAndDrawCalls

  • buildTexturesAndDrawCalls(): void
  • Returns void

contextChange

  • contextChange(): void
  • Handles the contextChange signal.

    It calculates this.MAX_TEXTURES and allocating the packed-geometry object pool.

    Returns void

destroy

  • destroy(): void
  • Destroys this AbstractBatchRenderer. It cannot be used again.

    Returns void

drawBatches

  • drawBatches(): void
  • Returns void

flush

  • flush(): void
  • Renders the content now and empties the current batch.

    Returns void

initFlushBuffers

  • initFlushBuffers(): void
  • Makes sure that static and dynamic flush pooled objects have correct dimensions

    Returns void

onPrerender

  • onPrerender(): void
  • Handles the prerender signal.

    It ensures that flushes start from the first geometry object again.

    Returns void

packInterleavedGeometry

  • packInterleavedGeometry(element: IBatchableElement, attributeBuffer: ViewableBuffer, indexBuffer: Uint16Array, aIndex: number, iIndex: number): void
  • Parameters

    • element: IBatchableElement
    • attributeBuffer: ViewableBuffer
    • indexBuffer: Uint16Array
    • aIndex: number
    • iIndex: number

    Returns void

render

  • render(element: IBatchableElement): void
  • Buffers the "batchable" object. It need not be rendered immediately.

    Parameters

    • element: IBatchableElement

      the element to render when using this renderer

    Returns void

start

  • start(): void
  • Starts a new sprite batch.

    Returns void

stop

  • stop(): void
  • Stops and flushes the current batch.

    Returns void

updateGeometry

  • updateGeometry(): void
  • Returns void

Generated using TypeDoc