---
title: "MTKModelIOVertexFormatFromMetal(_:)"
framework: metalkit
role: symbol
role_heading: Function
path: "metalkit/mtkmodeliovertexformatfrommetal(_:)"
---

# MTKModelIOVertexFormatFromMetal(_:)

Returns a converted Model I/O vertex format.

## Declaration

```swift
func MTKModelIOVertexFormatFromMetal(_ vertexFormat: MTLVertexFormat) -> MDLVertexFormat
```

## Parameters

- `vertexFormat`: A Metal vertex format to convert from.

## Return Value

Return Value A Model I/O vertex format value.

## Discussion

Discussion This function returns MDLVertexFormat.invalid if no matching MDLVertexFormat exists.

## See Also

### Converting Between Model I/O and Metal Vertex Formats

- [MTKMetalVertexFormatFromModelIO(_:)](metalkit/mtkmetalvertexformatfrommodelio(_:).md)
