gameforge - v0.1.12
    Preparing search index...

    Class Framebuffer

    A framebuffer can be used to render contents off of the screen. PIXI.BaseRenderTexture uses one internally to render into itself. You can attach a depth or stencil buffer to a framebuffer.

    On WebGL 2 machines, shaders can output to multiple textures simultaneously with GLSL 300 ES.

    PIXI

    Index

    Constructors

    • Parameters

      • width: number

        Width of the frame buffer

      • height: number

        Height of the frame buffer

      Returns Framebuffer

    Properties

    depth: boolean
    depthTexture: BaseTexture
    dirtyFormat: number
    dirtyId: number
    dirtySize: number
    disposeRunner: Runner
    glFramebuffers: { [key: string]: GLFramebuffer }
    height: number

    Height of framebuffer in pixels.

    multisample: MSAA_QUALITY

    Desired number of samples for antialiasing. 0 means AA should not be used.

    Experimental WebGL2 feature, allows to use antialiasing in individual renderTextures. Antialiasing is the same as for main buffer with renderer antialias: true options. Seriously affects GPU memory consumption and GPU performance.

    import { MSAA_QUALITY } from 'pixi.js';

    renderTexture.framebuffer.multisample = MSAA_QUALITY.HIGH;
    // ...
    renderer.render(myContainer, { renderTexture });
    renderer.framebuffer.blit(); // Copies data from MSAA framebuffer to texture
    PIXI.MSAA_QUALITY.NONE
    
    stencil: boolean
    width: number

    Width of framebuffer in pixels.

    Accessors

    • get colorTexture(): BaseTexture

      Reference to the colorTexture.

      Returns BaseTexture

    Methods

    • Add texture to the colorTexture array.

      Parameters

      Returns this

    • Destroys and removes the depth texture added to this framebuffer.

      Returns void

    • Disposes WebGL resources that are connected to this geometry.

      Returns void

    • Enable depth on the frame buffer.

      Returns this

    • Enable stencil on the frame buffer.

      Returns this

    • Resize the frame buffer

      Parameters

      • width: number

        Width of the frame buffer to resize to

      • height: number

        Height of the frame buffer to resize to

      Returns void