-
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
Fix texture loading and re-projection bug #3696
Conversation
…ueue any texture re-projections to be executed the next frame.
*/ | ||
ImageryLayerCollection.prototype.update = function(frameState) { | ||
var layers = this._layers; | ||
for (var i = 0, len = layers.length; i < len; ++i) { |
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.
Put length outside loop.
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.
Never mind.
@bagnell can you add tests for the new functions? |
@hpinkos Not really. I added the one that I could. The code runs in the tests but not individually unit tested. |
The code is OK with me. @kring would be the best person to review if he has time in the next day or two. |
// update collection: imagery indices, base layers, raise layer show/hide event | ||
imageryLayers._update(); | ||
// update each layer for texture reprojection. | ||
imageryLayers.update(frameState); |
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.
It's kind of dodgy to have two update methods on ImageryLayer
. How about calling update
queueReprojectionCommands
cause that's what it actually does, right?
Looks good to me other than the one minor comment. Could you say a sentence or two about what was actually happening to cause the imagery to refresh over and over? It's not obvious to me how queuing the commands immediately was causing that. |
This is ready. @kring I'm not exactly sure. It wasn't queueing commands that was the issue. It was loading terrain and imagery at the beginning of the frame. I had a bunch of problems using |
Ok, thanks for the explanation. I should have noticed this before, but this warrants a mention in CHANGES.md right? |
@kring CHANGES.md was update. This is ready. |
Fix texture loading and re-projection bug
👍 |
Move loading terrain and imagery to the end of the quadtree update. Queue any texture re-projections to be executed the next frame.
For #3690.