Class: GlBackBufferSystem

GlBackBufferSystem

For blend modes you need to know what pixels you are actually drawing to. For this to be possible in WebGL we need to render to a texture and then present that texture to the screen. This system manages that process.

As the main scene is rendered to a texture, it means we can sample it anc copy its pixels, something not possible on the main canvas.

If antialiasing is set to to true and useBackBuffer is set to true, then the back buffer will be antialiased. and the main gl context will not.

You only need to activate this back buffer if you are using a blend mode that requires it.

to activate is simple, you pass useBackBuffer:true to your render options

Implements

Members

defaultOptions GlBackBufferOptions static

default options for the back buffer system

Properties:
Name Type Default Description
useBackBuffer boolean false

if true will use the back buffer where required

useBackBuffer boolean

if true, the back buffer is used

Default Value:
  • false

Methods

destroy ()

destroys the back buffer

renderStart (options) protected

This is called before the RenderTargetSystem is started. This is where we replace the target with the back buffer if required.

Name Type Description
options RenderOptions

The options for this render.