Class: TextureManager

Tiny. TextureManager

Helper class to create a webGL Texture

new Tiny.TextureManager(renderer)

Name Type Description
renderer Tiny.WebGLRenderer

A reference to the current renderer

Members

glWebGLRenderingContext

The current WebGL rendering context

A reference to the current renderer

Methods

Binds a texture.

Destroys this manager and removes all its textures

destroyTexture(texture, skipRemove)

Deletes the texture from WebGL

Name Type Default Description
texture Tiny.BaseTexture | Tiny.Texture

the texture to destroy

skipRemove boolean false optional

Whether to skip removing the texture from the TextureManager.

Gets a texture.

Deletes all the textures from WebGL

updateTexture(texture, location){GLTexture}

Updates and/or Creates a WebGL texture for the renderer's context.

Name Type Description
texture Tiny.BaseTexture | Tiny.Texture

the texture to update

location number

the location the texture will be bound to.

Returns:
Type Description
GLTexture The gl texture.
Documentation generated by JSDoc 3.4.3 on Mon Dec 03 2018 17:48:52 GMT+0800 (CST)