createTexture

fun createTexture(engine: Engine, ktx: Ktx1Bundle, srgb: Boolean, callback: () -> Unit): Texture?

Creates a Texture object from a KTX file and populates all of its faces and miplevels.

ktx must stay alive until callback runs, once all texture data has been uploaded to the GPU.

Parameters

srgb

requests an sRGB format from the KTX file


fun createTexture(engine: Engine, ktx: Ktx1Bundle, srgb: Boolean): Texture?

Creates a Texture object from a KTX file and populates all of its faces and miplevels.

Takes ktx: it's destroyed after all the texture data has been uploaded, and can't be used afterwards.

Parameters

srgb

requests an sRGB format from the KTX file