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

Primitive fixes; docs, dev checks, cleanup; depth fail, rtc, hardware resources #8044

Merged
merged 8 commits into from
Sep 18, 2019
Merged
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Change Log
* `Camera.flyTo` flies to the correct location in 2D when the destination crosses the international date line [#7909](https://github.com/AnalyticalGraphicsInc/cesium/pull/7909)
* Fixed 3D tiles style coloring when multiple tilesets are in the scene [#8051](https://github.com/AnalyticalGraphicsInc/cesium/pull/8051)
* Improved display of tile coordinates for `TileCoordinatesImageryProvider` [#8131](https://github.com/AnalyticalGraphicsInc/cesium/pull/8131)
* Fixed relative-to-center check, `depthFailAppearance` resource freeing for `Primitive` [#8044](https://github.com/AnalyticalGraphicsInc/cesium/pull/8044)

### 1.61 - 2019-09-03

Expand Down
5 changes: 3 additions & 2 deletions Source/Scene/Primitive.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ define([
* @param {Object} [options] Object with the following properties:
* @param {GeometryInstance[]|GeometryInstance} [options.geometryInstances] The geometry instances - or a single geometry instance - to render.
* @param {Appearance} [options.appearance] The appearance used to render the primitive.
* @param {Appearance} [options.depthFailAppearance] The appearance used to shade this primitive when it fails the depth test.
* @param {Boolean} [options.show=true] Determines if this primitive will be shown.
* @param {Matrix4} [options.modelMatrix=Matrix4.IDENTITY] The 4x4 transformation matrix that transforms the primitive (all geometry instances) from model to world coordinates.
* @param {Boolean} [options.vertexCacheOptimize=false] When <code>true</code>, geometry vertices are optimized for the pre and post-vertex-shader caches.
Expand Down Expand Up @@ -320,7 +321,7 @@ define([
this.rtcCenter = options.rtcCenter;

//>>includeStart('debug', pragmas.debug);
if (defined(this.rtcCenter) && (!defined(this.geometryInstances) || (isArray(this.geometryInstances) && this.geometryInstances !== 1))) {
if (defined(this.rtcCenter) && (!defined(this.geometryInstances) || (isArray(this.geometryInstances) && this.geometryInstances.length !== 1))) {
throw new DeveloperError('Relative-to-center rendering only supports one geometry instance.');
}
//>>includeEnd('debug');
Expand Down Expand Up @@ -2180,7 +2181,7 @@ define([
var i;

this._sp = this._sp && this._sp.destroy();
this._pickSP = this._pickSP && this._pickSP.destroy();
this._spDepthFail = this._spDepthFail && this._spDepthFail.destroy();

var va = this._va;
length = va.length;
Expand Down