Class GeometrySystem

System plugin to the renderer to manage geometry.

Memberof

PIXI

Implements

Constructors

  • Parameters

    • renderer: Renderer

      The renderer this System works for.

    Returns GeometrySystem

Properties

canUseUInt32ElementIndex: boolean

true if support gl.UNSIGNED_INT in gl.drawElements or gl.drawElementsInstanced.

hasInstance: boolean

true if has ANGLE_instanced_arrays extension.

hasVao: boolean

true if we has *_vertex_array_object extension.

managedGeometries: {
    [key: number]: Geometry;
}

Cache for all geometries by id, used in case renderer gets destroyed or for profiling.

Type declaration

Methods

  • Binds geometry so that is can be drawn. Creating a Vao if required

    Parameters

    • Optional geometry: Geometry

      Instance of geometry to bind.

    • Optional shader: Shader

      Instance of shader to use vao for.

    Returns void

  • Generic destroy methods to be overridden by the subclass

    Returns void

  • Dispose all WebGL resources of all managed geometries.

    Parameters

    • Optional contextLost: boolean

      If context was lost, we suppress gl.delete calls

    Returns void

  • Disposes geometry.

    Parameters

    • geometry: Geometry

      Geometry with buffers. Only VAO will be disposed

    • Optional contextLost: boolean

      If context was lost, we suppress deleteVertexArray

    Returns void

  • Draws the currently bound geometry.

    Parameters

    • type: DRAW_MODES

      The type primitive to render.

    • Optional size: number

      The number of elements to be rendered. If not specified, all vertices after the starting vertex will be drawn.

    • Optional start: number

      The starting vertex in the geometry to start drawing from. If not specified, drawing will start from the first vertex.

    • Optional instanceCount: number

      The number of instances of the set of elements to execute. If not specified, all instances will be drawn.

    Returns this

  • Reset and unbind any active VAO and geometry.

    Returns void

  • Update buffers of the currently bound geometry.

    Returns void

Generated using TypeDoc