Phaser API Documentation

  Version: 
rebind([pipeline])

Description:

Use this to reset the gl context to the state that Phaser requires to continue rendering.

Calling this will:

  • Disable DEPTH_TEST, CULL_FACE and STENCIL_TEST.
  • Clear the depth buffer and stencil buffers.
  • Reset the viewport size.
  • Reset the blend mode.
  • Bind a blank texture as the active texture on texture unit zero.
  • Rebinds the given pipeline instance.

You should call this if you have previously called clear, and then wish to return rendering control to Phaser again.

Parameters:

name type arguments description
pipeline Phaser.Renderer.WebGL.WebGLPipeline <optional>

The pipeline instance to be rebound. If not given, the previous pipeline will be bound.

Since: 3.50.0