---
title: "init(deviceResource:using:)"
framework: realitykit
role: symbol
role_heading: Initializer
path: "realitykit/lowleveltexture/init(deviceresource:using:)"
---

# init(deviceResource:using:)

Creates a low-level texture from an existing LowLevelDeviceResource created and managed by the application.

## Declaration

```swift
@MainActor convenience init(deviceResource: LowLevelDeviceResource, using commandBuffer: (any MTLCommandBuffer)? = nil) throws
```

## Parameters

- `deviceResource`: The underlying texture this object should refer to.
- `commandBuffer`: The doc://com.apple.documentation/documentation/Metal/MTLCommandBuffer you intend to use for texture modifications. RealityKit waits for the command buffer to complete before utilizing the texture for rendering.
