WebGL - How to use framebuffers part 1
In this episode, I discuss how to setup a framebuffer object in order to use it to draw something off screen which will later be used to draw on screen.
- 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.
- general purpose drawing area
- 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