Class: TextureSystem

PIXI.TextureSystem

System plugin to the renderer to manage textures.

new PIXI.TextureSystem (renderer)

Name Type Description
renderer PIXI.Renderer

The renderer this system works for.

Implements

Members

boundTextures PIXI.BaseTexture[] readonly

Bound textures.

currentLocation number readonly

Current location.

managedTextures Array<PIXI.BaseTexture> readonly

List of managed textures.

hasIntegerTextures boolean protected

Whether glTexture with int/uint sampler type was uploaded.

unknownTexture PIXI.BaseTexture protectedreadonly

BaseTexture value that shows that we don't know what is bound.

Methods

bind (texture, location) void

Bind a texture to a specific location

If you want to unbind something, please use unbind(texture) instead of bind(null, textureLocation)

Name Type Attributes Default Description
texture PIXI.Texture | PIXI.BaseTexture

Texture to bind

location number <optional>
0

Location to bind at

contextChange () void

Sets up the renderer context and necessary buffers.

ensureSamplerType (maxTextures) void

Ensures that current boundTextures all have FLOAT sampler type, see PIXI.SAMPLER_TYPES for explanation.

Name Type Description
maxTextures number

number of locations to check

reset () void

Resets texture location and bound textures Actual bind(null, i) calls will be performed at next unbind() call

unbind (texture) void

Unbind a texture.

Name Type Attributes Description
texture PIXI.BaseTexture <optional>

Texture to bind