Back to Filament

setBuffer

docs/android/dokka/filament-android/com.google.android.filament/-buffer-object/set-buffer.md

1.75.02.8 KB
Original Source

//filament-android/com.google.android.filament/BufferObject/setBuffer

setBuffer

[main]
open fun setBuffer(engine: Engine, buffer: Buffer)

Asynchronously copy-initializes this BufferObject from the data provided.

Parameters

main

enginereference to the Engine to associate this BufferObject with
buffera CPU-side Buffer with the data used to initialize the BufferObject.

[main]
open fun setBuffer(engine: Engine, buffer: Buffer, destOffsetInBytes: Int, count: Int)

Asynchronously copy-initializes a region of this BufferObject from the data provided.

Parameters

main

enginereference to the Engine to associate this BufferObject with
buffera CPU-side Buffer with the data used to initialize the BufferObject.
destOffsetInBytesoffset in bytes into the BufferObject
countnumber of bytes to consume, defaults to buffer.remaining()

[main]
open fun setBuffer(engine: Engine, buffer: Buffer, destOffsetInBytes: Int, count: Int, handler: Any, callback: Runnable)

Asynchronously copy-initializes a region of this BufferObject from the data provided.

Parameters

main

enginereference to the Engine to associate this BufferObject with
buffera CPU-side Buffer with the data used to initialize the BufferObject.
destOffsetInBytesoffset in bytes into the BufferObject
countnumber of bytes to consume, defaults to buffer.remaining()
handleran Executor. On Android this can also be a Handler.
callbacka callback executed by handler when bufferis no longer needed.