Options
All
  • Public
  • Public/Protected
  • All
Menu

A collection of Textures and/or Renderbuffers that can be rendered to.

Hierarchy

  • default
    • Framebuffer

Index

Properties

ready: Promise<void>

Constructors

Methods

  • Checks for Framebuffer completeness, i.e. whether all attachements have a valid format and can be rendered to.

    Returns Promise<boolean>

    true if the Framebuffer is complete, false otherwise.

  • bind(): boolean
  • clear(param0: { color?: Record<number, number[]>; stencil?: number; depth?: number }): void
  • Clears the specified attachments to the provided values.

    example

    Clearing depth to 1 and color attachements 1 and 3 to red and green respectively:

    myFbo.clear({
    color: {
    1: [1, 0, 0],
    3: [0, 1, 0],
    },
    depth: 1,
    });

    Parameters

    • param0: { color?: Record<number, number[]>; stencil?: number; depth?: number }

      Object specifying the attachements to clear.

      • Optional color?: Record<number, number[]>
      • Optional stencil?: number
      • Optional depth?: number

    Returns void

  • Flags the underlying WebGLFramebuffer for deletion. The buffer cannot be bound afterwards.

    remarks

    Note, that only the framebuffer itself is deleted. The attached textures and renderbuffers remain unchanged and must be deleted manually.

    Returns Promise<void>

Generated using TypeDoc