ios - MTKTextureLoader fails with mipmapped texture -


when try load texture asset catalog:

let texloader = mtktextureloader.init(device: device) texloader.newtexture(withname: "temple", scalefactor: 1.0, bundle: nil, options: [:]) {(tex: mtltexture?, error: error?) in      guard tex != nil && error == nil else {         print("texture load failed. \(error)")         return     }      print("texture loaded. mipamp level count: \(tex!.mipmaplevelcount)") } 

it works ok if texture in catalog not mipmapped, if mipmapped, execution halts assertion failed:

library/caches/com.apple.xbs/sources/metal/metal-85.82.1/toolslayers/debug/mtldebugblitcommandencoder.mm:493: failed assertion `totalbytesused(7427) must <= sourcebuffer length.'

how load mipmapped texture?


Comments

Popular posts from this blog

sql server - Cannot query correctly (MSSQL - PHP - JSON) -

php - trouble displaying mysqli database results in correct order -

C++ Linked List -