One Logo Pool Ball
RealityFoundation · IOS API REFERENCE

LowLevelBuffer

class · iOS 26.0+ · SDK 27.1

final class LowLevelBuffer

Members (9)

init · iOS 26.0+

init

TypeScript
static init(descriptor: LowLevelBuffer_Descriptor): LowLevelBuffer
Swift declaration
init(descriptor: LowLevelBuffer.Descriptor) throws
get · iOS 26.0+

descriptor

TypeScript
get descriptor(): LowLevelBuffer_Descriptor
Swift declaration
final let descriptor: LowLevelBuffer.Descriptor
method · iOS 26.0+

withUnsafeBytes

TypeScript
withUnsafeBytes(callback: ((arg0: ArrayBuffer) => void)): void
Swift declaration
final func withUnsafeBytes(_ callback: (UnsafeRawBufferPointer) -> Void)

Read the buffer synchronously on the CPU. The buffer provided is only valid for the lifetime of the callback.

method · iOS 26.0+

withUnsafeMutableBytes

TypeScript
withUnsafeMutableBytes(callback: ((arg0: ArrayBuffer) => void)): void
Swift declaration
final func withUnsafeMutableBytes(_ callback: (UnsafeMutableRawBufferPointer) -> Void)

Update the buffer's contents synchronously on the CPU. The buffer provided is only valid for the lifetime of the callback.

method · iOS 26.0+

replaceUnsafeMutableBytes

TypeScript
replaceUnsafeMutableBytes(callback: ((arg0: ArrayBuffer) => void)): void
Swift declaration
final func replaceUnsafeMutableBytes(_ callback: (UnsafeMutableRawBufferPointer) -> Void)

Replace the buffer's contents synchronously on the CPU. The buffer's contents are unspecified, and it is the caller's responsibility to populate the buffer with valid data. The buffer provided is only valid for the lifetime of the callback.

method · iOS 26.0+

read

TypeScript
read(commandBuffer: SDKHandle): SDKHandle
Swift declaration
final func read(using commandBuffer: any MTLCommandBuffer) -> any MTLBuffer

Retrieve the current contents of the buffer, for GPU reading.

method · iOS 26.0+

replace

TypeScript
replace(commandBuffer: SDKHandle): SDKHandle
Swift declaration
final func replace(using commandBuffer: any MTLCommandBuffer) -> any MTLBuffer

Retrieve an MTLBuffer that can be used to replace the contents of the buffer on GPU using Metal. The buffer's contents are in an uninitialized state. The caller supplies the MTLCommandBuffer that they intend to use for buffer modifications. RealityKit will wait for the MTLCommandBuffer to complete before utilizing the buffer for rendering.

get · iOS 26.0+

bytesUsed

TypeScript
get bytesUsed(): number
Swift declaration
final var bytesUsed: Int { get set }
set · iOS 26.0+

bytesUsed

TypeScript
set bytesUsed(value: number)
Swift declaration
final var bytesUsed: Int { get set }

Skipped declarations

No declarations were skipped in this snapshot.

All RealityFoundation types →