DecodedImage

An image decoded on any thread and not on the GPU yet: the slow half of TextureLoader.loadTexture and HDRLoader.createTexture. Holds native memory until uploaded or closed.

Functions

Link copied to clipboard
open override fun close()

Frees the image, unless createTexture took it.

Link copied to clipboard
fun createTexture(engine: Engine, internalFormat: Texture.InternalFormat): Texture?

Uploads the image into a mipmapped 2D texture and frees it, on the engine's thread; null if that fails or it's gone.