Skip to content

Commit

Permalink
Fix batched shapes removal
Browse files Browse the repository at this point in the history
  • Loading branch information
Your Name committed Oct 14, 2024
1 parent cd6dc5d commit 59159ca
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,9 @@ class PathBatchRenderer : BatchRenderer {
}

override fun render(rc : RenderContext) {
// remove shapes that wasn't requested to be drawn this frame
for(path in pathToBatchedPaths.keys) {
// Remove shapes that wasn't requested to be drawn this frame
val pathsToRemove = pathToBatchedPaths.keys.filter { it.lastRequestedFrameIndex != rc.frameIndex }
for(path in pathsToRemove) {
if(path.lastRequestedFrameIndex != rc.frameIndex) {
removePathFromBatch(path)
}
Expand Down

0 comments on commit 59159ca

Please sign in to comment.