diff --git a/Specs/Scene/SceneSpec.js b/Specs/Scene/SceneSpec.js index c9bbbb8073a8..3faf61d56441 100644 --- a/Specs/Scene/SceneSpec.js +++ b/Specs/Scene/SceneSpec.js @@ -1357,6 +1357,32 @@ defineSuite([ scene.destroyForSpecs(); }); + it('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();