Documentation
    Preparing search index...

    Interface RenderTargetRecord

    Everything one cached render target needs at bind time.

    interface RenderTargetRecord {
        depthBuffer: object | null;
        depthTexture: object | null;
        framebuffer: object;
        height: number;
        stencil: boolean;
        texture: object;
        version: number;
        width: number;
    }
    Index
    depthBuffer: object | null

    The depth renderbuffer, or null — for a target built with depth: false or one that asked for the samplable form, which allocates RenderTargetRecord.depthTexture instead. At most one of the two is ever non-null.

    When RenderTargetRecord.stencil is set this is the packed DEPTH24_STENCIL8 renderbuffer, attached to DEPTH_STENCIL_ATTACHMENT rather than DEPTH_ATTACHMENT — one object serving both buffers, which is what makes the mutual exclusion with depthTexture a fact about the framebuffer rather than a policy (R-7, §67).

    depthTexture: object | null

    The depth attachment as a texture, for a target built with depthTexture: true (R-18, §69) — what a later pass binds and samples. null for every other target.

    framebuffer: object

    The framebuffer object to bind for drawing.

    height: number

    Height the attachments were allocated at, in texels.

    stencil: boolean

    Whether RenderTargetRecord.depthBuffer is the packed depth-plus-stencil form (§67, R-7) — i.e. whether a frame drawing into this target may run a stencil test, and must clear the stencil buffer.

    A boolean rather than a second handle: the packed renderbuffer is the depth buffer, so a stencilBuffer field would be an alias of depthBuffer that a reader could mistake for a second allocation.

    texture: object

    The colour attachment, bound when a material samples this target.

    version: number

    RenderTarget.version this record was allocated from.

    width: number

    Width the attachments were allocated at, in texels.