Luoqiaoyou
05/20/2021, 8:16 AMalloc<*>
instead.
Is it a way to invoke constructor function when i call alloc<*>
? because the params is final in klib, i can not assign value after alloc<*>
.
my code:
memScoped {
val info = alloc<GrMtlTextureInfo>()
info.fTexture = _texture.objcPtr() // fTexture is final in klib
renderTarget = GrBackendRenderTarget(480, 320, 1, info.reinterpret())
}
Dominaezzz
05/20/2021, 11:31 AMDominaezzz
05/20/2021, 11:32 AMLuoqiaoyou
05/20/2021, 12:15 PMDominaezzz
05/20/2021, 12:46 PM