loadTexture

actual fun loadTexture(engine: Engine, buffer: ByteArray, type: TextureLoader.TextureType): Texture?

Decodes image bytes (PNG, JPG, etc.) into a Filament Texture.

Return

the created Texture, or null on failure

Parameters

engine

the Engine to create the texture with

buffer

the raw encoded image data

type

the intended use of the texture, which influences the internal format selected

expect fun loadTexture(engine: Engine, buffer: ByteArray, type: TextureLoader.TextureType): Texture?

Decodes image bytes (PNG, JPG, etc.) into a Filament Texture.

Return

the created Texture, or null on failure

Parameters

engine

the Engine to create the texture with

buffer

the raw encoded image data

type

the intended use of the texture, which influences the internal format selected

actual fun loadTexture(engine: Engine, buffer: ByteArray, type: TextureLoader.TextureType): Texture?

Decodes image bytes (PNG, JPG, etc.) into a Filament Texture.

Return

the created Texture, or null on failure

Parameters

engine

the Engine to create the texture with

buffer

the raw encoded image data

type

the intended use of the texture, which influences the internal format selected

actual fun loadTexture(engine: Engine, buffer: ByteArray, type: TextureLoader.TextureType): Texture?

Decodes image bytes (PNG, JPG, etc.) into a Filament Texture.

Return

the created Texture, or null on failure

Parameters

engine

the Engine to create the texture with

buffer

the raw encoded image data

type

the intended use of the texture, which influences the internal format selected

actual fun loadTexture(engine: Engine, buffer: ByteArray, type: TextureLoader.TextureType): Texture?

Decodes image bytes (PNG, JPG, etc.) into a Filament Texture.

Return

the created Texture, or null on failure

Parameters

engine

the Engine to create the texture with

buffer

the raw encoded image data

type

the intended use of the texture, which influences the internal format selected