MTKModelIOVertexDescriptorFromMetalWithError
Returns a partially converted Model I/O vertex descriptor, reporting any error that occurs.
Declaration
extern MDLVertexDescriptor *MTKModelIOVertexDescriptorFromMetalWithError(MTLVertexDescriptor *metalDescriptor, NSError **error);Parameters
- metalDescriptor:
A Metal vertex descriptor to convert from.
- error:
A pointer to an Nserror object if an error occurred, or
nilif conversion succeeded.
Return Value
A Model I/O vertex descriptor object.
Discussion
This function can only set vertex format, offset, buffer index, and stride information in the resulting MDLMutableVertexDescriptor object. It does not add any semantic information such as attribute names. Names must be set in the returned MDLMutableVertexDescriptor object before it can be applied to a Model I/O mesh.