phaser - v3.90.0
    Preparing search index...

    Wrapper for a WebGL frame buffer, containing all the information that was used to create it.

    A WebGLFramebuffer should never be exposed outside the WebGLRenderer, so the WebGLRenderer can handle context loss and other events without other systems having to be aware of it. Always use WebGLFramebufferWrapper instead.

    Index

    Constructors

    • Parameters

      • gl: WebGLRenderingContext

        The WebGLRenderingContext to create the WebGLFramebuffer for.

      • width: number

        If addDepthStencilBuffer is true, this controls the width of the depth stencil.

      • height: number

        If addDepthStencilBuffer is true, this controls the height of the depth stencil.

      • renderTexture: WebGLTextureWrapper

        The color texture where the color pixels are written.

      • OptionaladdDepthStencilBuffer: boolean

        Create a Renderbuffer for the depth stencil? Default false.

      Returns WebGLFramebufferWrapper

    Properties

    addDepthStencilBuffer: boolean

    Create a Renderbuffer for the depth stencil?

    gl: WebGLRenderingContext

    The WebGL context this WebGLFramebuffer belongs to.

    height: number

    Height of the depth stencil.

    renderTexture: WebGLTextureWrapper

    The color texture where the color pixels are written.

    webGLFramebuffer: WebGLFramebuffer

    The WebGLFramebuffer being wrapped by this class.

    This property could change at any time. Therefore, you should never store a reference to this value. It should only be passed directly to the WebGL API for drawing.

    width: number

    Width of the depth stencil.

    Methods

    • Creates a WebGLFramebuffer from the given parameters.

      This is called automatically by the constructor. It may also be called again if the WebGLFramebuffer needs re-creating.

      Returns void

    • Destroys this WebGLFramebufferWrapper.

      Returns void