Class RenderTexturePool

Texture pool, used by FilterSystem and plugins.

Stores collection of temporary pow2 or screen-sized renderTextures

If you use custom RenderTexturePool for your filters, you can use methods getFilterTexture and returnFilterTexture same as in

Memberof

PIXI

Constructors

  • Parameters

    • Optional textureOptions: IBaseTextureOptions<any>

      options that will be passed to BaseRenderTexture constructor

    Returns RenderTexturePool

Properties

enableFullScreen: boolean

Allow renderTextures of the same size as screen, not just pow2

Automatically sets to true after setScreenSize

Default

false
textureOptions: IBaseTextureOptions<any>
texturePool: {}

Type declaration

    SCREEN_KEY: number

    Key that is used to store fullscreen renderTextures in a pool

    Methods

    • Clears the pool.

      Parameters

      • Optional destroyTextures: boolean

        Destroy all stored textures.

      Returns void

    • Creates texture with params that were specified in pool constructor.

      Parameters

      • realWidth: number

        Width of texture in pixels.

      • realHeight: number

        Height of texture in pixels.

      • Optional multisample: MSAA_QUALITY

        Number of samples of the framebuffer.

      Returns RenderTexture

    • Gets extra texture of the same size as input renderTexture

      getFilterTexture(input, 0.5) or getFilterTexture(0.5, input)

      Parameters

      • input: RenderTexture

        renderTexture from which size and resolution will be copied

      • Optional resolution: number

        override resolution of the renderTexture It overrides, it does not multiply

      • Optional multisample: MSAA_QUALITY

        number of samples of the renderTexture

      Returns RenderTexture

    • Gets a Power-of-Two render texture or fullScreen texture

      Parameters

      • minWidth: number

        The minimum width of the render texture.

      • minHeight: number

        The minimum height of the render texture.

      • Optional resolution: number

        The resolution of the render texture.

      • Optional multisample: MSAA_QUALITY

        Number of samples of the render texture.

      Returns RenderTexture

      The new render texture.

    • Alias for returnTexture, to be compliant with FilterSystem interface.

      Parameters

      Returns void

    • Place a render texture back into the pool.

      Parameters

      Returns void

    • If screen size was changed, drops all screen-sized textures, sets new screen size, sets enableFullScreen to true

      Size is measured in pixels, renderer.view can be passed here, not renderer.screen

      Parameters

      • size: ISize

        Initial size of screen.

      Returns void

    Generated using TypeDoc