bufferData

open override fun bufferData(target: Int, size: Int, sourceData: ShortArray?, usage: Int, offset: Int = 0)
open override fun bufferData(target: Int, size: Int, sourceData: IntArray?, usage: Int, offset: Int = 0)
open override fun bufferData(target: Int, size: Int, sourceData: FloatArray?, usage: Int, offset: Int = 0)


open override fun bufferData(target: Int, size: Int, sourceData: ByteArray?, usage: Int, offset: Int = 0)

Byte-typed bufferData overload — used to upload pre-packed pixel bytes (e.g. a decoded video frame) into a GL_PIXEL_UNPACK_BUFFER for an asynchronous texSubImage2D DMA into a texture.


open override fun bufferData(target: Int, size: Int, usage: Int)

Allocate-only bufferData used for round-tripping pixel pack buffers (GL_STREAM_READ): reserves size bytes on the GPU without uploading source data. Pair with readPixelsToBuffer to write the framebuffer into the bound PBO and getBufferSubData to drain it back to CPU once a fence has signalled.