WebGL - Framebuffer objects part 2

In this episode, I discuss how to use the FBO from the last episode in order to draw out the current screen as a texture on an object.

Concepts:
#### Framebuffers
* Use a framebuffer to perform different types of processing before displaying content.
* Use a framebuffer as a texture image.
* "Offscreen drawing"
* FBO (Framebuffer Objects) have attachments (color, depth, stencil), like the depth and stencil buffers.

#### RenderBuffers
* general purpose drawing area

#### 8 steps
* create FBO
* create texture object
* create render object
* bind render object to the target and set size
* attach texture object to color attachment of FBO
* attach render object to the depth attachment of FBO
* check status of FBO
* draw frame using FBO

Resources:
* https://github.com/davidwparker/programmingtil-webgl/tree/master/0091-framebuffer-part-2

© programmingtil.com