Skip to content

Commit

Permalink
Fix for request render mode
Browse files Browse the repository at this point in the history
  • Loading branch information
lilleyse committed May 29, 2019
1 parent eece95f commit 9b78c9d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 14 deletions.
19 changes: 10 additions & 9 deletions Source/Scene/Cesium3DTileset.js
Original file line number Diff line number Diff line change
Expand Up @@ -1727,15 +1727,6 @@ define([
cancelOutOfViewRequests(this, frameState);
raiseLoadProgressEvent(this, frameState);
this._cache.unloadTiles(this, unloadTile);

var statistics = this._statisticsPerPass[Cesium3DTilePass.RENDER];
var credits = this._credits;
if (defined(credits) && statistics.selected !== 0) {
var length = credits.length;
for (var i = 0; i < length; ++i) {
frameState.creditDisplay.addCredit(credits[i]);
}
}
};

/**
Expand Down Expand Up @@ -2254,6 +2245,16 @@ define([
// Update pass statistics
Cesium3DTilesetStatistics.clone(statistics, passStatistics);

if (isRender) {
var credits = tileset._credits;
if (defined(credits) && statistics.selected !== 0) {
var length = credits.length;
for (var i = 0; i < length; ++i) {
frameState.creditDisplay.addCredit(credits[i]);
}
}
}

return ready;
}

Expand Down
10 changes: 5 additions & 5 deletions Source/Scene/Scene.js
Original file line number Diff line number Diff line change
Expand Up @@ -3198,12 +3198,9 @@ define([
}

function prePassesUpdate(scene) {
var frameState = scene._frameState;
frameState.creditDisplay.update();
frameState.creditDisplay.beginFrame();

scene._jobScheduler.resetBudgets();

var frameState = scene._frameState;
var primitives = scene.primitives;
primitives.prePassesUpdate(frameState);

Expand All @@ -3212,6 +3209,7 @@ define([
}

scene._pickPositionCacheDirty = true;
frameState.creditDisplay.update();
}

function postPassesUpdate(scene) {
Expand All @@ -3220,7 +3218,6 @@ define([
primitives.postPassesUpdate(frameState);

RequestScheduler.update();
frameState.creditDisplay.endFrame();
}

var scratchBackgroundColor = new Color();
Expand Down Expand Up @@ -3248,6 +3245,8 @@ define([
}
frameState.backgroundColor = backgroundColor;

frameState.creditDisplay.beginFrame();

scene.fog.update(frameState);

us.update(frameState);
Expand Down Expand Up @@ -3293,6 +3292,7 @@ define([
}
}

frameState.creditDisplay.endFrame();
context.endFrame();
}

Expand Down

0 comments on commit 9b78c9d

Please sign in to comment.