Posts

Post not yet marked as solved
0 Replies
594 Views
Given six KTX, ASTC compressed textures -- all equal in size and attributes -- a.ktx, b.ktx, c.ktx, d.ktx, e.ktx, & f.ktx, I can embed them in the bundle and then create a working cube via- let cube = MDLTexture(cubeWithImagesNamed: [ "a.ktx", "b.ktx", "c.ktx", "d.ktx", "e.ktx", "f.ktx"]) This can be assigned to background.contents and works great. If, on the other hand, I have loaded those six textures from some other source into six separate MTLTextures, I cannot provide them as an array to background.contents (it fails with "image at index 0 is NULL). I have attempted to create a cube MTLTexture with the appropriate MTLTextureDescriptor.textureCubeDescriptor (using the pixel format and other attributes from the source textures), then copying the data via MTLBlitCommandEncoder, however the end result, while error free, is a cube that is wholly purple. I suspect this may be that the source textures are ASTC compressed, but am a bit at a loss as the documentation is rather sparse. Everything else seems to be incredibly easy relative to this very simple need of creating a cube from textures that aren't named bundle items. Any guidance or hints would be greatly appreciated.
Posted
by DWForbes.
Last updated
.
Post not yet marked as solved
0 Replies
359 Views
Using the ARKit functionality I have gathered the data for an ARWorldMap on my LIDAR equipped physical device. I then migrate that serialized (NSKeyedArchiver) data to a different project that I would like to run in a simulator, doing development on analysis and processing code without having to constantly deploy and launch on a physical device. When I try to deserialize the ARWorldMap in this iOS 14.5, simulated iPhone 12 Pro I am met with- Error Domain=NSCocoaErrorDomain Code=4864 "Class 'ARWorldMap' disallows secure coding. It must return YES from supportsSecureCoding." UserInfo={NSDebugDescription=Class 'ARWorldMap' disallows secure coding. It must return YES from supportsSecureCoding.} The identical project deployed on my physical iPhone 12 Pro works as expected. Again, my goal in deserializing the object graph isn't to perform any LIDAR work or anything hardware coupled, but purely to use the framework containers as convenient geometry holders for efficient workflow. After I've polished the processing/analysis code I can then move it to the primary project, and it is a significant hindrance if these basic data classes aren't available on the simulator devices. Is there something simple I am missing here? Is there some toggle I have to set to utilize these basic data classes in a simulator? It would be unfortunate if I have to make proxy classes, and a bifurcated code path, from top to bottom just to move data between scenarios. Thank you very much. And apologies if there is something trivial I am missing here. Dennis
Posted
by DWForbes.
Last updated
.