Back to Filament

BufferObject

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

1.75.02.5 KB
Original Source

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

BufferObject

open class BufferObject

A generic GPU buffer containing data. Usage of this BufferObject is optional. For simple use cases it is not necessary. It is useful only when you need to share data between multiple VertexBuffer instances. It also allows you to efficiently swap-out the buffers in VertexBuffer. NOTE: For now this is only used for vertex data, but in the future we may use it for other things (e.g. compute).

See also

VertexBuffer

Types

NameSummary
Builder[main]
open class Builder

Functions

NameSummary
getByteCount[main]
open fun getByteCount(): Int
Returns the size of this BufferObject in elements.
getNativeObject[main]
open fun getNativeObject(): Long
setBuffer[main]
open fun setBuffer(engine: Engine, buffer: Buffer)
Asynchronously copy-initializes this BufferObject from the data provided.
[main]
open fun setBuffer(engine: Engine, buffer: Buffer, destOffsetInBytes: Int, count: Int)
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.