---
title: "copyResourceViews(sourcePool:sourceRange:destinationIndex:)"
framework: metal
role: symbol
role_heading: Instance Method
path: "metal/mtlresourceviewpool/copyresourceviews(sourcepool:sourcerange:destinationindex:)"
---

# copyResourceViews(sourcePool:sourceRange:destinationIndex:)

Copies a range of resource views from a source view pool to a destination location in this view pool.

## Declaration

```swift
func copyResourceViews(sourcePool: any MTLResourceViewPool, sourceRange: Range<Int>, destinationIndex: Int) -> MTLResourceID
```

## Parameters

- `sourcePool`: Resource view pool from which to copy resource views.
- `sourceRange`: The range in the source resource view pool to copy.
- `destinationIndex`: The starting index in this destination view pool into which to copy the source range of resource views.

## Return Value

Return Value The MTLResourceID of the resource view corresponding to destinationIndex of the copy in this resource view pool.
