write

fun GpuDevice.write(buffer: TransferBuffer, bytes: ByteArray, offset: Int = 0)(source)

Copies bytes into buffer at byte offset. Convenient for one-off uploads such as texture pixels; per-frame data should be written through map instead to avoid the extra copy.

Throws

if mapping fails.