new Tiny.TextureManager(renderer)
Name | Type | Description |
---|---|---|
renderer |
Tiny.WebGLRenderer |
A reference to the current renderer |
Members
-
glWebGLRenderingContext
-
The current WebGL rendering context
-
rendererTiny.WebGLRenderer
-
A reference to the current renderer
Methods
-
bindTexture()
-
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.
-
getTexture()
-
Gets a texture.
-
removeAll()
-
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.