Phaser API Documentation

  Version: 
setFramebuffer(framebuffer, [updateScissor], [setViewport], [texture], [clear])

Description:

Sets the given framebuffer as the active and currently bound framebuffer.

If there was another framebuffer already bound it will force a pipeline flush.

Typically, you should call pushFramebuffer instead of this method.

Parameters:

name type arguments Default description
framebuffer WebGLFramebuffer

The framebuffer that needs to be bound.

updateScissor boolean <optional> false

If a framebuffer is given, set the gl scissor to match the frame buffer size? Or, if null given, pop the scissor from the stack.

setViewport boolean <optional> true

Should the WebGL viewport be set?

texture WebGLTexture <optional> null

Bind the given frame buffer texture?

clear boolean <optional> false

Clear the frame buffer after binding?

Returns:
Description:

This WebGLRenderer instance.

Since: 3.0.0