read

abstract fun read(target: ArrayBufferView, x: Int, y: Int, width: Int = this.effectiveWidth, height: Int = this.effectiveHeight, level: Int = 0)(source)
abstract fun read(targetBuffer: ByteBuffer, targetFormat: ColorFormat = format, targetType: ColorType = type, level: Int = 0)(source)

read the contents of the ColorBuffer and write to targetBuffer, potentially with format and type conversions

Parameters

targetBuffer

a ByteBuffer to which the contents of the ColorBuffer will be written

targetFormat

the ColorFormat that is used for the image data stored in targetBuffer, default is ColorBuffer.format

targetType

the ColorType that is used for the image data stored in targetBuffer, default is ColorBuffer.type

level

the mipmap-level of ColorBuffer to read from