---
title: "makeMeshPart(resource:indexOffset:indexCount:primitive:windingOrder:bounds:)"
framework: RealityKit
role: symbol
role_heading: Instance Method
platforms: [iOS 27.0+, iPadOS 27.0+, tvOS 27.0+, visionOS 27.0+]
path: "realitykit/lowlevelrendercontextstandalone/makemeshpart(resource:indexoffset:indexcount:primitive:windingorder:bounds:)"
---

# makeMeshPart(resource:indexOffset:indexCount:primitive:windingOrder:bounds:)

Creates a mesh part that selects a contiguous range of indices from a mesh resource.

## Declaration

```swift
final func makeMeshPart(resource: LowLevelMeshResource, indexOffset: Int, indexCount: Int, primitive: MTLPrimitiveType, windingOrder: MTLWinding, bounds: BoundingSphereBox) throws -> LowLevelMeshPart
```

## Parameters

- `resource`: The mesh resource whose index and vertex buffers this part draws from.
- `indexOffset`: The byte offset of the first index within the index buffer.
- `indexCount`: The number of indices to use for this part.
- `primitive`: The geometric primitive type to use when rendering.
- `windingOrder`: The winding order that identifies front-facing polygons.
- `bounds`: The model-space bounding volume for this part.

## Return Value

Return Value A newly created LowLevelMeshPart.

## Discussion

Discussion note: An error if the index range falls outside the resource’s index buffer.
