Phaser API Documentation

setTextureZero(texture, [flush])


Binds a texture directly to texture unit zero then activates it. If the texture is already at unit zero, it skips the bind. Make sure to call clearTextureZero after using this method.


name type arguments Default description
texture WebGLTexture

The WebGL texture that needs to be bound.

flush boolean <optional> false

Flush the pipeline if the texture is different?

Since: 3.50.0