From 415fac847ba92c0f2dd5a1e7b26b0f7449e9615c Mon Sep 17 00:00:00 2001 From: Tom Fili Date: Fri, 14 Jul 2017 14:51:07 -0400 Subject: [PATCH 1/3] Fixed blinking when labels were loaded. --- Source/Scene/Scene.js | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/Source/Scene/Scene.js b/Source/Scene/Scene.js index d9fb50af9bbb..7e72849ae69b 100644 --- a/Source/Scene/Scene.js +++ b/Source/Scene/Scene.js @@ -2146,10 +2146,10 @@ define([ Camera.clone(savedCamera, camera); } else { - updateAndClearFramebuffers(scene, passState, backgroundColor); if (mode !== SceneMode.SCENE2D || scene._mapMode2D === MapMode2D.ROTATE) { - executeCommandsInViewport(true, scene, passState); + executeCommandsInViewport(true, scene, passState, backgroundColor); } else { + updateAndClearFramebuffers(scene, passState, backgroundColor); execute2DViewportCommands(scene, passState); } } @@ -2277,7 +2277,7 @@ define([ passState.viewport = originalViewport; } - function executeCommandsInViewport(firstViewport, scene, passState) { + function executeCommandsInViewport(firstViewport, scene, passState, backgroundColor) { var depthOnly = scene.frameState.passes.depth; if (!firstViewport && !depthOnly) { @@ -2290,9 +2290,14 @@ define([ createPotentiallyVisibleSet(scene); - if (firstViewport && !depthOnly) { - executeComputeCommands(scene); - executeShadowMapCastCommands(scene); + if (firstViewport) { + if (defined(backgroundColor)) { + updateAndClearFramebuffers(scene, passState, backgroundColor); + } + if (!depthOnly) { + executeComputeCommands(scene); + executeShadowMapCastCommands(scene); + } } executeCommands(scene, passState); From 088e7223be7a3bea8d34bfe027fb2fc3a33a39e8 Mon Sep 17 00:00:00 2001 From: Tom Fili Date: Fri, 14 Jul 2017 15:04:28 -0400 Subject: [PATCH 2/3] eslint fix. --- Source/Scene/Scene.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Source/Scene/Scene.js b/Source/Scene/Scene.js index 7e72849ae69b..a3b31f20b820 100644 --- a/Source/Scene/Scene.js +++ b/Source/Scene/Scene.js @@ -2145,13 +2145,11 @@ define([ executeCommands(scene, passState); Camera.clone(savedCamera, camera); + } else if (mode !== SceneMode.SCENE2D || scene._mapMode2D === MapMode2D.ROTATE) { + executeCommandsInViewport(true, scene, passState, backgroundColor); } else { - if (mode !== SceneMode.SCENE2D || scene._mapMode2D === MapMode2D.ROTATE) { - executeCommandsInViewport(true, scene, passState, backgroundColor); - } else { - updateAndClearFramebuffers(scene, passState, backgroundColor); - execute2DViewportCommands(scene, passState); - } + updateAndClearFramebuffers(scene, passState, backgroundColor); + execute2DViewportCommands(scene, passState); } } From 5d83e0febf790c763c9583cbcfb043317884a400 Mon Sep 17 00:00:00 2001 From: Tom Fili Date: Fri, 14 Jul 2017 15:21:21 -0400 Subject: [PATCH 3/3] Updated CHANGES. --- CHANGES.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.md b/CHANGES.md index 169804a9751f..521cdea9bb00 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -6,6 +6,7 @@ Change Log * Added ability to show tile urls in the 3D Tiles Inspector. [#5592](https://github.com/AnalyticalGraphicsInc/cesium/pull/5592) * Added behavior to `Cesium3DTilesInspector` that selects the first tileset hovered over if no tilest is specified. [#5139](https://github.com/AnalyticalGraphicsInc/cesium/issues/5139) * Added ability to provide a `width` and `height` to `scene.pick`. [#5602](https://github.com/AnalyticalGraphicsInc/cesium/pull/5602) +* Fixed issue where scene would blink when labels were added. [#5537](https://github.com/AnalyticalGraphicsInc/cesium/issues/5537) * Fixed crash when using the `Cesium3DTilesInspectorViewModel` and removing a tileset [#5607](https://github.com/AnalyticalGraphicsInc/cesium/issues/5607) ### 1.35.2 - 2017-07-11