docs/android/dokka/filament-android/com.google.android.filament/-vertex-buffer/set-buffer-at.md
//filament-android/com.google.android.filament/VertexBuffer/setBufferAt
[main]
open fun setBufferAt(engine: Engine, bufferIndex: Int, buffer: Buffer)
Asynchronously copy-initializes the specified buffer from the given buffer data.
main
| engine | reference to the Engine to associate this VertexBuffer with |
| bufferIndex | index of the buffer to initialize. Must be between 0 and bufferCount() - 1. |
| buffer | a 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.
main
| engine | reference to the Engine to associate this VertexBuffer with |
| bufferIndex | index of the buffer to initialize. Must be between 0 and bufferCount() - 1. |
| buffer | a 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. |
| destOffsetInBytes | offset 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.
main
| engine | reference to the Engine to associate this VertexBuffer with |
| bufferIndex | index of the buffer to initialize. Must be between 0 and bufferCount() - 1. |
| buffer | a 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. |
| destOffsetInBytes | offset in bytes into the buffer at index bufferIndex of this vertex buffer set. |
| handler | an Executor. On Android this can also be a Handler. |
| callback | a callback executed by handler when bufferis no longer needed. |