-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple Globe updates #3593
Multiple Globe updates #3593
Conversation
Nice, I'll look at this later today. @lilleyse can you review to see how this will work with your shadow changes? |
Yeah I'll check this out soon. |
In order to get this into 3D Tiles, we might need to add a separate primitive collection, e.g., |
As for naming, instead of |
That's all my comments. @lilleyse can review and merge when ready. |
|
||
if (width === 0 || height === 0) { | ||
return; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe not relevant to this PR, but is this a check we should be doing scene-wide?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also perhaps this should be a helper function since it comes up 3 times.
if (!this.show) {
return;
}
var context = frameState.context;
var width = context.drawingBufferWidth;
var height = context.drawingBufferHeight;
if (width === 0 || height === 0) {
return;
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seemed odd to me too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
...but is this a check we should be doing scene-wide?
The code in Globe
is some of the oldest in Cesium and this was probably a workaround that was never removed. I'm going to remove it since, you're right, this should be a scene-wide check.
It might be helpful to add comments above |
There should be a test that checks the new functionality by calling |
That's all from me. |
…r tweaks from review.
@lilleyse I can't think of a good test that would fail in master and pass here. I'm going to wait for the infinitely scrolling 2D for a good test. I can place the camera near the edge of the map in 2D and in master the pixel would be the background color but with multiple updates it would be the color of the imagery. I have updated everything else from the comments. |
Ok sounds good to me. |
What's the plan for merging this into |
Just to make sure, does merging into |
Yes, I think we'll want to do |
I can work on bringing this into |
👍 Thanks. |
The globe can be updated multiple times in a single frame to get terrain tiles for multiple render passes, for example, multiple camera views, viewports, framebuffers, etc.
Globe.initialize
andGlobe.finalize
(I'm open to name suggestions) will set up the globe for rendering and manage tile loading/unloading which only happens once per frame.Globe.update
selects already loaded tiles for rendering based on the current view.For #2594 and the
infinite-2D
branch.