Skip to content

Commit 1cbc087

Browse files
author
Hannah
committed
Merge pull request #3500 from AnalyticalGraphicsInc/wireframe
Fix terrain wireframe.
2 parents 1e3f2eb + 8791bb6 commit 1cbc087

File tree

1 file changed

+2
-15
lines changed

1 file changed

+2
-15
lines changed

Source/Scene/GlobeSurfaceTileProvider.js

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -747,24 +747,11 @@ define([
747747
return;
748748
}
749749

750-
if (defined(surfaceTile.meshForWireframePromise)) {
750+
if (!defined(surfaceTile.terrainData) || !defined(surfaceTile.terrainData._mesh)) {
751751
return;
752752
}
753753

754-
surfaceTile.meshForWireframePromise = surfaceTile.terrainData.createMesh(provider._terrainProvider.tilingScheme, tile.x, tile.y, tile.level);
755-
if (!defined(surfaceTile.meshForWireframePromise)) {
756-
// deferrred
757-
return;
758-
}
759-
760-
var vertexArray = surfaceTile.vertexArray;
761-
762-
when(surfaceTile.meshForWireframePromise, function(mesh) {
763-
if (surfaceTile.vertexArray === vertexArray) {
764-
surfaceTile.wireframeVertexArray = createWireframeVertexArray(context, surfaceTile.vertexArray, mesh);
765-
}
766-
surfaceTile.meshForWireframePromise = undefined;
767-
});
754+
surfaceTile.wireframeVertexArray = createWireframeVertexArray(context, surfaceTile.vertexArray, surfaceTile.terrainData._mesh);
768755
}
769756

770757
/**

0 commit comments

Comments
 (0)