<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "macOS: 13.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Metal",
  "identifier" : "/documentation/Metal/MTLRenderCommandEncoder/setObjectBuffers:offsets:withRange:",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Metal"
    ],
    "preciseIdentifier" : "c:objc(pl)MTLRenderCommandEncoder(im)setObjectBuffers:offsets:withRange:"
  },
  "title" : "setObjectBuffers:offsets:withRange:"
}
-->

# setObjectBuffers:offsets:withRange:

Encodes a command that assigns multiple buffers to a range of entries in the object shader argument table.

```
- (void) setObjectBuffers:(id<MTLBuffer> const[]) buffers offsets:(const NSUInteger[]) offsets withRange:(NSRange) range;
```

## Parameters

`buffers`

A pointer to a C array of [`MTLBuffer`](/documentation/Metal/MTLBuffer) instances the command assigns to entries in the object shader argument table for buffers.

`offsets`

A pointer to a C array of unsigned integers. Each element represents the location, in bytes, from the start of the corresponding [`MTLBuffer`](/documentation/Metal/MTLBuffer) element in `buffers` where the object shader argument data begins.

    See the     [Metal feature set tables (PDF)](https://developer.apple.com/metal/Metal-Feature-Set-Tables.pdf)     to check for offset alignment requirements for buffers in     `device`     and     `constant`     address space.

`range`

A span of integers that represent the entries in the object shader argument table for buffers. Each entry stores a record of the corresponding element in `buffers` and `offsets`.

## Discussion

By default, the texture at each index is `nil`.

> Note:
> The Swift version of this method is ``doc://com.apple.metal/documentation/Metal/MTLRenderCommandEncoder/setObjectBuffers(_:offsets:range:)``.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)