LogoPixi’VN
pixi-jsClasses

Class: GlBackBufferSystem

Defined in: node_modules/pixi.js/lib/rendering/renderers/gl/GlBackBufferSystem.d.ts:37

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 and 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

Advanced

Implements

Constructors

Constructor

> new GlBackBufferSystem(renderer): GlBackBufferSystem

Defined in: node_modules/pixi.js/lib/rendering/renderers/gl/GlBackBufferSystem.d.ts:55

Parameters

renderer

WebGLRenderer

Returns

GlBackBufferSystem

Properties

useBackBuffer

> useBackBuffer: boolean

Defined in: node_modules/pixi.js/lib/rendering/renderers/gl/GlBackBufferSystem.d.ts:47

if true, the back buffer is used


defaultOptions

> static defaultOptions: GlBackBufferOptions

Defined in: node_modules/pixi.js/lib/rendering/renderers/gl/GlBackBufferSystem.d.ts:45

default options for the back buffer system

Methods

destroy()

> destroy(): void

Defined in: node_modules/pixi.js/lib/rendering/renderers/gl/GlBackBufferSystem.d.ts:67

destroys the back buffer

Returns

void

Implementation of

System.destroy


init()

> init(options?): void

Defined in: node_modules/pixi.js/lib/rendering/renderers/gl/GlBackBufferSystem.d.ts:56

Parameters

options?

GlBackBufferOptions

Returns

void

Implementation of

System.init


renderEnd()

> protected renderEnd(): void

Defined in: node_modules/pixi.js/lib/rendering/renderers/gl/GlBackBufferSystem.d.ts:63

Returns

void


renderStart()

> protected renderStart(options): void

Defined in: node_modules/pixi.js/lib/rendering/renderers/gl/GlBackBufferSystem.d.ts:62

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

Parameters

options

RenderOptions

The options for this render.

Returns

void