Skip to content
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

Don't share geometry arrays between Batch and Primitive #8569

Merged
merged 3 commits into from
Jan 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Apps/Sandcastle/gallery/development/Circle Outline.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
});
// Add the geometry instance to primitives.
scene.primitives.add(new Cesium.Primitive({
geometryInstances : [circleOutlineInstance],
geometryInstances : circleOutlineInstance,
appearance : new Cesium.PerInstanceColorAppearance({
flat : true,
renderState : {
Expand Down Expand Up @@ -72,7 +72,7 @@
});
// Add the geometry instance to primitives.
scene.primitives.add(new Cesium.Primitive({
geometryInstances : [circleOutlineInstance],
geometryInstances : circleOutlineInstance,
appearance : new Cesium.PerInstanceColorAppearance({
flat : true,
renderState : {
Expand Down
4 changes: 2 additions & 2 deletions Apps/Sandcastle/gallery/development/Circle.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
});
// Add the geometry instance to primitives.
scene.primitives.add(new Cesium.Primitive({
geometryInstances: [redCircleInstance],
geometryInstances: redCircleInstance,
appearance: new Cesium.PerInstanceColorAppearance({
closed: true
})
Expand All @@ -71,7 +71,7 @@
});
// Add the geometry instance to primitives.
scene.primitives.add(new Cesium.Primitive({
geometryInstances: [greenCircleInstance],
geometryInstances: greenCircleInstance,
appearance: new Cesium.PerInstanceColorAppearance({
closed: true
})
Expand Down
4 changes: 2 additions & 2 deletions Apps/Sandcastle/gallery/development/Corridor.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
});
// Add the geometry instance to primitives.
scene.primitives.add(new Cesium.Primitive({
geometryInstances : [redCorridorInstance],
geometryInstances : redCorridorInstance,
appearance : new Cesium.PerInstanceColorAppearance({
closed : true
})
Expand Down Expand Up @@ -118,7 +118,7 @@
});
// Add the geometry instance to primitives.
scene.primitives.add(new Cesium.Primitive({
geometryInstances : [blueCorridorInstance],
geometryInstances : blueCorridorInstance,
appearance : new Cesium.PerInstanceColorAppearance({
closed : true
})
Expand Down
2 changes: 1 addition & 1 deletion Apps/Sandcastle/gallery/development/Cylinder Outline.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
});
// Add the instance to primitives.
scene.primitives.add(new Cesium.Primitive({
geometryInstances : [cylinderOutline],
geometryInstances : cylinderOutline,
appearance : new Cesium.PerInstanceColorAppearance({
flat : true,
renderState : {
Expand Down
3 changes: 2 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ Change Log
* Fixed a bug where toggling point cloud classification visibility would result in a grey screen on Linux / Nvidia [#8538](https://github.com/AnalyticalGraphicsInc/cesium/pull/8538)
* Fixed a bug where a point in a `PointPrimitiveCollection` is rendered in the middle of the screen instead of being clipped. [#8542](https://github.com/AnalyticalGraphicsInc/cesium/pull/8542)
* Fixed a crash when deleting and re-creating polylines from CZML. `ReferenceProperty` now returns undefined when the target entity or property does not exist, instead of throwing. [#8544](https://github.com/AnalyticalGraphicsInc/cesium/pull/8544)
* Fixed a bug where rapidly updating a PolylineCollection could result in an instanceIndex is out of range error [#8546](https://github.com/AnalyticalGraphicsInc/cesium/pull/8546)
* Fixed a bug where rapidly updating a `PolylineCollection` could result in an instanceIndex is out of range error. [#8546](https://github.com/AnalyticalGraphicsInc/cesium/pull/8546)
* Fixed a crash that could occur when an entity was deleted while the corresponding `Primitive` was being created asynchronously. [#8569](https://github.com/AnalyticalGraphicsInc/cesium/pull/8569)

### 1.65.0 - 2020-01-06

Expand Down
2 changes: 1 addition & 1 deletion Source/DataSources/StaticGeometryColorBatch.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ import Property from './Property.js';
primitive = new Primitive({
show : false,
asynchronous : true,
geometryInstances : geometries,
geometryInstances : geometries.slice(),
appearance : new this.appearanceType({
translucent : this.translucent,
closed : this.closed
Expand Down
2 changes: 1 addition & 1 deletion Source/DataSources/StaticGeometryPerMaterialBatch.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ import Property from './Property.js';
primitive = new Primitive({
show : false,
asynchronous : true,
geometryInstances : geometries,
geometryInstances : geometries.slice(),
appearance : new this.appearanceType({
material : this.material,
translucent : this.material.isTranslucent(),
Expand Down
2 changes: 1 addition & 1 deletion Source/DataSources/StaticGroundGeometryColorBatch.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ import Property from './Property.js';
primitive = new GroundPrimitive({
show : false,
asynchronous : true,
geometryInstances : geometries,
geometryInstances : geometries.slice(),
classificationType : this.classificationType
});
primitives.add(primitive, this.zIndex);
Expand Down
2 changes: 1 addition & 1 deletion Source/DataSources/StaticGroundGeometryPerMaterialBatch.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ import Property from './Property.js';
primitive = new GroundPrimitive({
show : false,
asynchronous : true,
geometryInstances : geometries,
geometryInstances : geometries.slice(),
appearance : new this.appearanceType({
material : this.material
// translucent and closed properties overridden
Expand Down
2 changes: 1 addition & 1 deletion Source/DataSources/StaticGroundPolylinePerMaterialBatch.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ import Property from './Property.js';
primitive = new GroundPolylinePrimitive({
show : false,
asynchronous : this._asynchronous,
geometryInstances : geometries,
geometryInstances : geometries.slice(),
appearance : new this.appearanceType(),
classificationType : this.classificationType
});
Expand Down
2 changes: 1 addition & 1 deletion Source/DataSources/StaticOutlineGeometryBatch.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ import Property from './Property.js';
primitive = new Primitive({
show : false,
asynchronous : true,
geometryInstances : geometries,
geometryInstances : geometries.slice(),
appearance : new PerInstanceColorAppearance({
flat : true,
translucent : this.translucent,
Expand Down