From 34995baaa26deed8ee4f446ccf8a9a6af1ab8894 Mon Sep 17 00:00:00 2001 From: Luke San Antonio Bialecki Date: Thu, 26 Jul 2018 11:51:50 -0400 Subject: [PATCH] Add regression test for issue #6812 --- Specs/Scene/SceneSpec.js | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/Specs/Scene/SceneSpec.js b/Specs/Scene/SceneSpec.js index c9bbbb8073a8..a08801ba067e 100644 --- a/Specs/Scene/SceneSpec.js +++ b/Specs/Scene/SceneSpec.js @@ -1357,6 +1357,32 @@ defineSuite([ scene.destroyForSpecs(); }); + fit('changing the camera frustum does not cause continuous rendering in requestRenderMode', function() { + var scene = createScene(); + + scene.renderForSpecs(); + + var lastRenderTime = JulianDate.clone(scene.lastRenderTime, scratchTime); + expect(lastRenderTime).toBeDefined(); + expect(scene._renderRequested).toBe(false); + + scene.requestRenderMode = true; + scene.maximumRenderTimeChange = undefined; + + scene.camera.frustum.near *= 1.1; + + // Render once properly + scene.renderForSpecs(); + expect(scene.lastRenderTime).not.toEqual(lastRenderTime); + + // Render again - but this time nothing should happen. + lastRenderTime = JulianDate.clone(scene.lastRenderTime, scratchTime); + scene.renderForSpecs(); + expect(scene.lastRenderTime).toEqual(lastRenderTime); + + scene.destroyForSpecs(); + }); + it('successful completed requests causes a new frame to be rendered in requestRenderMode', function() { var scene = createScene();