Options
All
  • Public
  • Public/Protected
  • All
Menu

System plugin to the renderer to manage geometry.

memberof

PIXI

Hierarchy

Index

Constructors

constructor

Properties

Protected CONTEXT_UID

CONTEXT_UID: number

Protected _activeGeometry

_activeGeometry: Geometry

Protected _activeVao

_activeVao: WebGLVertexArrayObject

Protected _boundBuffer

_boundBuffer: GLBuffer

canUseUInt32ElementIndex

canUseUInt32ElementIndex: boolean

Protected gl

hasInstance

hasInstance: boolean

hasVao

hasVao: boolean

Readonly managedBuffers

managedBuffers: {}

Type declaration

Readonly managedGeometries

managedGeometries: {}

Type declaration

renderer

renderer: Renderer

Methods

Protected activateVao

  • Activate vertex array object

    Parameters

    • geometry: Geometry

      Geometry instance

    • program: Program

      Shader program instance

    Returns void

bind

  • 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

    Returns void

Protected checkCompatibility

  • Check compatibility between a geometry and a program

    Parameters

    Returns void

Protected contextChange

  • contextChange(): void
  • Sets up the renderer context and necessary buffers.

    Returns void

destroy

  • destroy(): void
  • Generic destroy methods to be overridden by the subclass

    Returns void

disposeAll

  • disposeAll(contextLost?: boolean): void
  • dispose all WebGL resources of all managed geometries and buffers

    Parameters

    • Optional contextLost: boolean

    Returns void

disposeBuffer

  • disposeBuffer(buffer: Buffer, contextLost?: boolean): void
  • Disposes buffer

    Parameters

    • buffer: Buffer

      buffer with data

    • Optional contextLost: boolean

    Returns void

disposeGeometry

  • disposeGeometry(geometry: Geometry, contextLost?: boolean): void
  • Disposes geometry

    Parameters

    • geometry: Geometry

      Geometry with buffers. Only VAO will be disposed

    • Optional contextLost: boolean

    Returns void

draw

  • Draw the geometry

    Parameters

    • type: DRAW_MODES

      the type primitive to render

    • Optional size: number
    • Optional start: number
    • Optional instanceCount: number

    Returns GeometrySystem

Protected getSignature

  • Takes a geometry and program and generates a unique signature for them.

    Parameters

    • geometry: Geometry

      to get signature from

    • program: Program

      to test geometry against

    Returns string

    Unique signature of the geometry and program

Protected initGeometryVao

  • initGeometryVao(geometry: Geometry, program: Program, incRefCount?: boolean): WebGLVertexArrayObject
  • 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.

    Parameters

    • geometry: Geometry

      Instance of geometry to to generate Vao for

    • program: Program

      Instance of program

    • Optional incRefCount: boolean

    Returns WebGLVertexArrayObject

reset

  • reset(): void
  • Reset and unbind any active VAO and geometry

    Returns void

Protected unbind

  • unbind(): void
  • Unbind/reset everything

    Returns void

Protected updateBuffers

  • updateBuffers(): void
  • Update buffers

    Returns void

Generated using TypeDoc