Back to Filament

setBufferAt

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

1.75.03.7 KB
Original Source

//filament-android/com.google.android.filament/VertexBuffer/setBufferAt

setBufferAt

[main]
open fun setBufferAt(engine: Engine, bufferIndex: Int, buffer: Buffer)

Asynchronously copy-initializes the specified buffer from the given buffer data.

Parameters

main

enginereference to the Engine to associate this VertexBuffer with
bufferIndexindex of the buffer to initialize. Must be between 0 and bufferCount() - 1.
buffera CPU-side Buffer representing the data used to initialize the VertexBuffer at index bufferIndex. buffer should contain raw, untyped data that will be copied as-is into the buffer.

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

Asynchronously copy-initializes a region of the specified buffer from the given buffer data.

Parameters

main

enginereference to the Engine to associate this VertexBuffer with
bufferIndexindex of the buffer to initialize. Must be between 0 and bufferCount() - 1.
buffera CPU-side Buffer representing the data used to initialize the VertexBuffer at index bufferIndex. buffer should contain raw, untyped data that will be copied as-is into the buffer.
destOffsetInBytesoffset in bytes into the buffer at index bufferIndex of this vertex buffer set.

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

Asynchronously copy-initializes a region of the specified buffer from the given buffer data.

Parameters

main

enginereference to the Engine to associate this VertexBuffer with
bufferIndexindex of the buffer to initialize. Must be between 0 and bufferCount() - 1.
buffera CPU-side Buffer representing the data used to initialize the VertexBuffer at index bufferIndex. buffer should contain raw, untyped data that will be copied as-is into the buffer.
destOffsetInBytesoffset in bytes into the buffer at index bufferIndex of this vertex buffer set.
handleran Executor. On Android this can also be a Handler.
callbacka callback executed by handler when bufferis no longer needed.