pixi.js
    Preparing search index...

    Class PipelineSystemAdvanced

    A system that creates and manages the GPU pipelines.

    Caching Mechanism: At its core, the system employs a two-tiered caching strategy to minimize the redundant creation of GPU pipelines (or "pipes"). This strategy is based on generating unique keys that represent the state of the graphics settings and the specific requirements of the item being rendered. By caching these pipelines, subsequent draw calls with identical configurations can reuse existing pipelines instead of generating new ones.

    State Management: The system differentiates between "global" state properties (like color masks and stencil masks, which do not change frequently) and properties that may vary between draw calls (such as geometry, shaders, and blend modes). Unique keys are generated for both these categories using getStateKey for global state and getGraphicsStateKey for draw-specific settings. These keys are then then used to caching the pipe. The next time we need a pipe we can check the cache by first looking at the state cache and then the pipe cache.

    Implements

    Index

    Constructors

    Methods

    • Generic destroy methods to be overridden by the subclass

      Returns void

    • Returns a hash of buffer names mapped to bind locations. This is used to bind the correct buffer to the correct location in the shader.

      Parameters

      • geometry: Geometry

        The geometry where to get the buffer names

      • program: GpuProgram

        The program where to get the buffer names

      Returns Record<string, string>

      An object of buffer names mapped to the bind location.

    • Parameters

      • colorMask: number

      Returns void

    • Parameters

      • multisampleCount: number

      Returns void

    • Parameters

      • renderTarget: GpuRenderTarget

      Returns void