Phaser API Documentation

  Version: 
setProgram(program)

Description:

Binds a shader program.

If there was a different program already bound it will force a pipeline flush first.

If the same program given to this method is already set as the current program, no change will take place and this method will return false.

Parameters:

name type description
program WebGLProgram

The program that needs to be bound.

Returns:
Description:

true if the given program was bound, otherwise false.

Type:
  • boolean
Since: 3.0.0