setUniformBlock method

void setUniformBlock(
  1. String name,
  2. ByteData? bytes
)

Assigns the byte contents of a uniform block by name. bytes must match the block's std140 layout; pass null to clear the binding.

Implementation

void setUniformBlock(String name, ByteData? bytes) {
  if (bytes == null) {
    _uniformBlocks.remove(name);
  } else {
    _uniformBlocks[name] = bytes;
  }
}