From 622d831934af9bdaa0f356f10a80acca87065eb6 Mon Sep 17 00:00:00 2001 From: Nathan Schulte Date: Tue, 6 Aug 2019 14:47:44 -0500 Subject: [PATCH 1/5] document depthFailAppearance option --- Source/Scene/Primitive.js | 1 + 1 file changed, 1 insertion(+) diff --git a/Source/Scene/Primitive.js b/Source/Scene/Primitive.js index e48988ae0d89..ed246d740a80 100644 --- a/Source/Scene/Primitive.js +++ b/Source/Scene/Primitive.js @@ -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 true, geometry vertices are optimized for the pre and post-vertex-shader caches. From 903ae42be6a63bdd613e6a614579dbfab069e5dc Mon Sep 17 00:00:00 2001 From: Nathan Schulte Date: Tue, 6 Aug 2019 14:48:14 -0500 Subject: [PATCH 2/5] properly check rtc geometryInstances requirement --- Source/Scene/Primitive.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Scene/Primitive.js b/Source/Scene/Primitive.js index ed246d740a80..f5ae2e22b7a1 100644 --- a/Source/Scene/Primitive.js +++ b/Source/Scene/Primitive.js @@ -321,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'); From a5d812890ce5ffc572eb09bdcccd36c323fdfd9a Mon Sep 17 00:00:00 2001 From: Nathan Schulte Date: Tue, 6 Aug 2019 14:49:36 -0500 Subject: [PATCH 3/5] destroy also frees depthFailAppearance resources --- Source/Scene/Primitive.js | 1 + 1 file changed, 1 insertion(+) diff --git a/Source/Scene/Primitive.js b/Source/Scene/Primitive.js index f5ae2e22b7a1..97d9a4bd4a91 100644 --- a/Source/Scene/Primitive.js +++ b/Source/Scene/Primitive.js @@ -2182,6 +2182,7 @@ define([ 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; From 3df75e1c98b81dbbb1654b5d2d28ba53fc5b5a9e Mon Sep 17 00:00:00 2001 From: Nathan Schulte Date: Tue, 6 Aug 2019 14:50:29 -0500 Subject: [PATCH 4/5] remove unused _pickSP destroy call --- Source/Scene/Primitive.js | 1 - 1 file changed, 1 deletion(-) diff --git a/Source/Scene/Primitive.js b/Source/Scene/Primitive.js index 97d9a4bd4a91..5fb90bb18dde 100644 --- a/Source/Scene/Primitive.js +++ b/Source/Scene/Primitive.js @@ -2181,7 +2181,6 @@ 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; From 713963f0827a955e455d26cd218f42c1307e555e Mon Sep 17 00:00:00 2001 From: Nathan Schulte Date: Fri, 6 Sep 2019 14:33:10 -0500 Subject: [PATCH 5/5] update change log --- CHANGES.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index 6919179dfd9d..3db5dfb02e0a 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,11 @@ Change Log ========== +### 1.62 - 2019-10-?? + +##### Fixes :wrench: +* Primitve: fixed relative-to-center check, `depthFailAppearance` resource freeing and docs. + ### 1.61 - 2019-09-03 ##### Additions :tada: