gameforge - v0.1.12
    Preparing search index...

    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

    PIXI

    Index

    Constructors

    Properties

    enableFullScreen: boolean

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

    Automatically sets to true after setScreenSize

    false
    
    textureOptions: IBaseTextureOptions
    texturePool: { [key: string]: RenderTexture[]; [key: number]: RenderTexture[] }
    SCREEN_KEY: number

    Key that is used to store fullscreen renderTextures in a pool

    Methods

    • Clears the pool.

      Parameters

      • OptionaldestroyTextures: 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.

      • Optionalmultisample: 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

      • Optionalresolution: number

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

      • Optionalmultisample: 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.

      • Optionalresolution: number

        The resolution of the render texture.

      • Optionalmultisample: 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