clearBindings method

  1. @override
void clearBindings()
override

Forgets every binding, leaving rasteriser state alone: uniform blocks, textures, every vertex slot and the index buffer with its count.

Needed because bindings outlive a draw: the mesh loop leaves an index buffer and a pipeline bound, and the next thing in the pass may have a different vertex layout or no indices at all. Every backend forgets all of it; the software rasteriser used to keep the geometry, so a draw after this call re-drew the last mesh there and drew nothing everywhere else.

Implementation

@override
void clearBindings() {
  commands.add(const RecordedClearBindings());
  _forget();
}