Builder

class Builder

Builder for creating Texture instances.

Use the Builder to construct a Texture object instance.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
fun async(callback: (Texture, AsyncCallStatus) -> Unit = { _, _ -> }): Texture.Builder

Creates the Texture asynchronously: callback runs once on the main thread when its memory is allocated (AsyncCallStatus.CANCELED if it never was). Until then, only async calls on it are safe; check Texture.isCreationComplete. Needs Engine.isAsynchronousModeEnabled.

Link copied to clipboard
fun build(engine: Engine): Texture

Creates the Texture object and returns a pointer to it.

Link copied to clipboard

Specifies the depth in texels of the texture. Doesn't need to be a power-of-two.

Link copied to clipboard

Creates an external texture. The content must be set using Texture.setExternalStream.

Link copied to clipboard

Specifies the internal format of this texture.

Link copied to clipboard
fun height(height: Int): Texture.Builder

Specifies the height in texels of the texture. Doesn't need to be a power-of-two.

Link copied to clipboard

Specify a native texture to import as a Filament texture.

Link copied to clipboard
fun levels(levels: Int): Texture.Builder

Specifies the number of mip map levels.

Link copied to clipboard

Associates an optional name with this Texture for debugging purposes.

Link copied to clipboard

Specifies the type of sampler to use.

Link copied to clipboard
fun samples(samples: Int): Texture.Builder

Specifies the number of samples used for MSAA (Multisample Anti-Aliasing).

Link copied to clipboard

Specifies how a texture's channels map to color components.

Link copied to clipboard

Specifies if the texture will be used as a render target attachment.

Link copied to clipboard

Specifies the width in texels of the texture. Doesn't need to be a power-of-two.