NumericArray

Types

Link copied to clipboard
class Bytes(val array: ByteArray, val byteCount: Int = array.size) : NumericArray
Link copied to clipboard
class Floats(val array: FloatArray, val byteCount: Int = array.size * Float.SIZE_BYTES) : NumericArray
Link copied to clipboard
class Ints(val array: IntArray, val byteCount: Int = array.size * Int.SIZE_BYTES) : NumericArray
Link copied to clipboard
class IntsFromList(val list: IntList) : NumericArray

Zero-copy upload from an IntList: the backing array may be larger than list.size, so byteCount (and the GL backend, given a correct size argument) bounds the upload. Avoids the IntList.toIntArray copy the eager Ints variant would force.

Link copied to clipboard
class Shorts(val array: ShortArray, val byteCount: Int = array.size * Short.SIZE_BYTES) : NumericArray

Properties

Link copied to clipboard
abstract val byteCount: Int