Skip to main content

Framebuffer

Index

Constructors

constructor

Properties

framebuffer

framebuffer: WebGLFramebuffer

graphicsContext

height

height: number

texelSize

texelSize: [texelWidth: number, texelHeight: number]

width

width: number

Accessors

texture

  • get texture(): WebGLTexture
  • Returns WebGLTexture

Methods

bind

  • bind(): void
  • Binds the framebuffer and redirects drawing, WARNING you should use graphicsContext.pushFramebuffer(...) unless you know what you're doing*


    Returns void

blitToScreen

  • blitToScreen(): void
  • Returns void

copyToTexture

  • copyToTexture(texture: WebGLTexture): void
  • Parameters

    • texture: WebGLTexture

    Returns void

resize

  • resize(width: number, height: number): void
  • Parameters

    • width: number
    • height: number

    Returns void

unbind

  • unbind(): void
  • Unbinds the framebuffer and returns drawing to the screen WARNING you shoud use graphicsContext.popFramebuffer() unless you know what you're doing


    Returns void