Skip to content

Commit

Permalink
Merge pull request #73 from AnalyticalGraphicsInc/Issue66
Browse files Browse the repository at this point in the history
Fixed Issue66 caused by undefined render state.
  • Loading branch information
mramato committed Mar 12, 2014
2 parents 5aad3e7 + 9c25992 commit fa132e0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions AGICHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Beta Releases
### b27 - 2014-04-01

* Fixed crash and bug which prevented sensor dome and ellipsoid horizon surface materials from being changed after initial creation.
* Fixed bug caused by undefined render state in sensor dome and ellipsoid horizon surface facets when the sensor definition was changed.

### b26 - 2014-03-03

Expand Down
6 changes: 4 additions & 2 deletions Source/Scene/CustomSensorVolume.js
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ define([
*/
this.ellipsoidHorizonSurfaceMaterial = defined(options.ellipsoidHorizonSurfaceMaterial) ? options.ellipsoidHorizonSurfaceMaterial : undefined;
this._ellipsoidHorizonSurfaceMaterial = undefined;
this._ellipsoidHorizonSurfaceIsTranslucent = undefined;

/**
* The surface appearance of the sensor dome. This can be one of several built-in {@link Material} objects or a custom material, scripted with
Expand All @@ -309,6 +310,7 @@ define([
*/
this.domeSurfaceMaterial = defined(options.domeSurfaceMaterial) ? options.domeSurfaceMaterial : undefined;
this._domeSurfaceMaterial = undefined;
this._domeSurfaceIsTranslucent = undefined;

/**
* The color of the polyline where the sensor outline intersects the central body. The default is {@link Color.WHITE}.
Expand Down Expand Up @@ -1682,7 +1684,7 @@ define([
var ellipsoidHorizonSurfaceIsTranslucent = ellipsoidHorizonSurfaceMaterial.isTranslucent();

// Initial render state creation
if (showThroughEllipsoidChanged ||
if (definitionChanged || showThroughEllipsoidChanged ||
(!defined(this._ellipsoidHorizonSurfaceColorCommands)) ||
(this._ellipsoidHorizonSurfaceIsTranslucent !== ellipsoidHorizonSurfaceIsTranslucent)) {

Expand Down Expand Up @@ -1728,7 +1730,7 @@ define([
var domeSurfaceIsTranslucent = domeSurfaceMaterial.isTranslucent();

// Initial render state creation
if (showThroughEllipsoidChanged ||
if (definitionChanged || showThroughEllipsoidChanged ||
(!defined(this._domeColorCommands)) ||
(this._domeSurfaceIsTranslucent !== domeSurfaceIsTranslucent)) {

Expand Down

0 comments on commit fa132e0

Please sign in to comment.