MaLiang
MaLiang copied to clipboard
commitCommands fires draw call too early
It should look like this, otherwise some lines can be omitted on redraw.
internal func commitCommands() {
commandBuffer?.addCompletedHandler { cb in
self.modified = true
}
commandBuffer?.commit()
commandBuffer = nil
modified = true // keep it, otherwise clear doesn't work
}