Phaser API Documentation

  Version: 
setTexture2D(texture)

Description:

Binds a texture at a texture unit. If a texture is already bound to that unit it will force a flush on the current pipeline.

Parameters:

name type description
texture WebGLTexture

The WebGL texture that needs to be bound.

Returns:
Description:

The texture unit that was assigned to the Texture Source.

Type:
  • number
Examples:
Since: 3.0.0