From 9a1b252a11692255b2b75c7a394013848153608d Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 18 Sep 2020 17:50:57 +0100 Subject: [PATCH] Use `shouldFlush` --- src/renderer/webgl/pipelines/SinglePipeline.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/renderer/webgl/pipelines/SinglePipeline.js b/src/renderer/webgl/pipelines/SinglePipeline.js index 8ad5d396e..9d45bf086 100644 --- a/src/renderer/webgl/pipelines/SinglePipeline.js +++ b/src/renderer/webgl/pipelines/SinglePipeline.js @@ -156,7 +156,7 @@ var SinglePipeline = new Class({ var hasFlushed = false; - if (this.vertexCount + 6 > this.vertexCapacity) + if (this.shouldFlush(6)) { this.flush(); @@ -260,7 +260,7 @@ var SinglePipeline = new Class({ var hasFlushed = false; - if (this.vertexCount + 3 > this.vertexCapacity) + if (this.shouldFlush(3)) { this.flush();