From fa2421645a8c5eba348c3243c71a82eb2755eafa Mon Sep 17 00:00:00 2001 From: aardgoose Date: Fri, 13 Sep 2024 11:54:23 +0100 Subject: [PATCH] fixup --- src/renderers/common/Renderer.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/renderers/common/Renderer.js b/src/renderers/common/Renderer.js index ab8980029451b7..c8f19034bebf88 100644 --- a/src/renderers/common/Renderer.js +++ b/src/renderers/common/Renderer.js @@ -424,7 +424,8 @@ class Renderer { // - const renderBundleNeedsUpdate = renderBundleData.renderContexts.has( renderContext ) === false || bundleGroup.needsUpdate === true; + const needsUpdate = bundleGroup.version !== renderBundleData.version; + const renderBundleNeedsUpdate = renderBundleData.renderContexts.has( renderContext ) === false || needsUpdate; renderBundleData.renderContexts.add( renderContext ); @@ -432,7 +433,7 @@ class Renderer { this.backend.beginBundle( renderContext ); - if ( renderBundleData.renderObjects === undefined || bundleGroup.needsUpdate === true ) { + if ( renderBundleData.renderObjects === undefined || needsUpdate ) { renderBundleData.renderObjects = []; @@ -450,7 +451,7 @@ class Renderer { this.backend.finishBundle( renderContext, renderBundle ); - bundleGroup.needsUpdate = false; + renderBundleData.version = bundleGroup.version; } else {