textmode.js / TextmodeFramebuffer
Class: TextmodeFramebuffer
Framebuffer class for managing offscreen rendering targets initialized via Textmodifier.createFramebuffer.
TextmodeFramebuffer instances contain 3 attachments to support the rendering pipeline:
- Attachment 0: Character and transform data (RGBA)
- Attachment 1: charColor (RGBA)
- Attachment 2: cellColor (RGBA)
Extends
Disposable
Accessors
| Accessor | Description |
|---|---|
| attachmentCount | Number of color attachments available on this framebuffer. |
| framebuffer | The underlying WebGLFramebuffer handle. |
| height | Height of the framebuffer in pixels. |
| textures | The color attachment textures owned by this framebuffer. |
| width | Width of the framebuffer in pixels. |
Methods
| Method | Description |
|---|---|
| begin | Begin rendering into this framebuffer. |
| dispose | Dispose the framebuffer, attached textures, and optional depth renderbuffer. |
| end | Finish rendering into this framebuffer and restore the previous framebuffer. |
| readPixels | Read RGBA pixel data from one attachment. |
| resize | Resize the framebuffer and all attached textures. |