bytes method

Uint8List bytes()

Returns a copy of the active portion of the buffer. Primarily used to decode the buffer into a Uint8List to run CommandBuffers on the GPU:

 GPUEngine.run(commandBuffer.bytes())

Implementation

Uint8List bytes() {
  Uint8List tape = Uint8List(offset);
  for (int i = 0; i < offset; i = i + 1) {
    tape[i] = _buffer.getUint8(i);
  }
  return tape;
}