I want to create the feature as mentioned below in Picture. The number tells the touch order in the screen and dot tells the position. I want to create as same effect.
We can do this using normal drawing index primitive method. But I want to know whether Is it possible to create this effect using MTKMesh ? Please suggest/give some ideas to perform this in better way ?
You probably shouldn't use a MTKMesh
in this case. After all, if you have all of the vertex and index data, you can just place it directly in one or more MTLBuffer
objects and use those to draw. Using MetalKit means you'll need to create all kinds of intermediate objects (a MDLVertexDescriptor
, a MTKMeshBufferAllocator
, one or more mesh buffers, a submesh, and an MDLMesh
) only to turn around and iterate all of those superfluous objects to get back to the underlying Metal buffers. MTKMesh
exists to make it easy to import 3D content from model files via Model I/O.