Phaser API Documentation

  Version: 
setFramebuffer(framebuffer, [updateScissor], [resetTextures], [setViewport])

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.

resetTextures boolean <optional> false

Should the WebGL Textures be reset after the new framebuffer is bound?

setViewport boolean <optional> true

Should the WebGL viewport be set?

Returns:
Description:

This WebGLRenderer instance.

Since: 3.0.0