Skip to content

Commit 6020a01

Browse files
committed
Merge branch 'master' into texture-compression
2 parents e415e0c + 9d7348d commit 6020a01

File tree

8 files changed

+81
-18
lines changed

8 files changed

+81
-18
lines changed

CHANGES.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,22 @@ Change Log
33

44
### 1.29 - 2017-01-02
55

6-
* Added the ability to blend a `Model` with a color/translucency. Added `color`, `colorBlendMode`, and `colorBlendAmount` properties to `Model`, `ModelGraphics`, and CZML. Added `ColorBlendMode` enum. [#4547](https://github.com/AnalyticalGraphicsInc/cesium/pull/4547)
7-
* Added the ability to render a `Model` with a silhouette. Added `silhouetteColor` and `silhouetteSize` properties to `Model`, `ModelGraphics`, and CZML. [#4314](https://github.com/AnalyticalGraphicsInc/cesium/pull/4314)
8-
* Added new `Label` properties `showBackground`, `backgroundColor`, and `backgroundPadding` to the primitive, Entity, and CZML layers.
9-
* Added new enum `VerticalOrigin.BASELINE`. Previously, `VerticalOrigin.BOTTOM` would sometimes align to the baseline depending on the contents of a label.
10-
* Added support for newlines (`\n`) in Cesium `Label`s and CZML. [#2402](https://github.com/AnalyticalGraphicsInc/cesium/issues/2402)
11-
* Fixed tooltips for gallery thumbnails in Sandcastle [#4702](https://github.com/AnalyticalGraphicsInc/cesium/pull/4702)
12-
* Fixed `Rectangle.union` to correctly account for rectangles that cross the IDL [#4732](https://github.com/AnalyticalGraphicsInc/cesium/pull/4732).
6+
* Improved 3D Models
7+
* Added the ability to blend a `Model` with a color/translucency. Added `color`, `colorBlendMode`, and `colorBlendAmount` properties to `Model`, `ModelGraphics`, and CZML. Also added `ColorBlendMode` enum. [#4547](https://github.com/AnalyticalGraphicsInc/cesium/pull/4547)
8+
* Added the ability to render a `Model` with a silhouette. Added `silhouetteColor` and `silhouetteSize` properties to `Model`, `ModelGraphics`, and CZML. [#4314](https://github.com/AnalyticalGraphicsInc/cesium/pull/4314)
9+
* Improved Labels
10+
* Added new `Label` properties `showBackground`, `backgroundColor`, and `backgroundPadding` to the primitive, Entity, and CZML layers.
11+
* Added new enum `VerticalOrigin.BASELINE`. Previously, `VerticalOrigin.BOTTOM` would sometimes align to the baseline depending on the contents of a label.
12+
* Added support for newlines (`\n`) in Cesium `Label`s and CZML. [#2402](https://github.com/AnalyticalGraphicsInc/cesium/issues/2402)
1313
* Fixed texture rotation for `RectangleGeometry` [#2737](https://github.com/AnalyticalGraphicsInc/cesium/issues/2737)
14+
* Fixed translucency in Firefox 50. https://github.com/AnalyticalGraphicsInc/cesium/pull/4762
15+
* Fixed a bug that caused `GroundPrimitive` to render incorrectly on systems without the `WEBGL_depth_texture` extension. [#4747](https://github.com/AnalyticalGraphicsInc/cesium/pull/4747)
16+
* Fixed default Mapbox token and added a watermark to notify users that they need to sign up for their own token.
17+
* Fixed a bug that could cause a "readyImagery is not actually ready" exception with some configurations of imagery layers.
18+
* Fixed `Rectangle.union` to correctly account for rectangles that cross the IDL [#4732](https://github.com/AnalyticalGraphicsInc/cesium/pull/4732).
1419
* Added `divideComponents` function to `Cartesian2`, `Cartesian3`, and `Cartesian4`. [#4750](https://github.com/AnalyticalGraphicsInc/cesium/pull/4750)
1520
* Added `WebGLConstants` enum. Previously, this was part of the private Renderer API. [#4731](https://github.com/AnalyticalGraphicsInc/cesium/pull/4731)
16-
* Fixed an bug that caused `GroundPrimitive` to render incorrectly on systems without the `WEBGL_depth_texture` extension. [#4747](https://github.com/AnalyticalGraphicsInc/cesium/pull/4747)
17-
* Fixed default Mapbox token and added a watermark to notify users that they need to sign up for their own token.
21+
* Fixed tooltips for gallery thumbnails in Sandcastle [#4702](https://github.com/AnalyticalGraphicsInc/cesium/pull/4702)
1822
* Added compressed texture support. The supported extensions are `WEBGL_compressed_s3tc`, `WEBGL_compressed_texture_pvrtc`, and `WEBGL_compressed_texture_etc1`. [#4758](https://github.com/AnalyticalGraphicsInc/cesium/pull/4758)
1923

2024
### 1.28 - 2016-12-01

Source/DataSources/LabelGraphics.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ define([
3535
* @param {Property} [options.outlineColor=Color.BLACK] A Property specifying the outline {@link Color}.
3636
* @param {Property} [options.outlineWidth=1.0] A numeric Property specifying the outline width.
3737
* @param {Property} [options.show=true] A boolean Property specifying the visibility of the label.
38-
* @param {Property} [options.showBackground=true] A boolean Property specifying the visibility of the background behind the label.
38+
* @param {Property} [options.showBackground=false] A boolean Property specifying the visibility of the background behind the label.
3939
* @param {Property} [options.backgroundColor=new Color(0.165, 0.165, 0.165, 0.8)] A Property specifying the background {@link Color}.
4040
* @param {Property} [options.backgroundPadding=new Cartesian2(7, 5)] A {@link Cartesian2} Property specifying the horizontal and vertical background padding in pixels.
4141
* @param {Property} [options.scale=1.0] A numeric Property specifying the scale to apply to the text.

Source/Scene/FXAA.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ define([
8888
pixelDatatype : PixelDatatype.UNSIGNED_BYTE
8989
});
9090

91-
if (context.depthStencilTexture) {
91+
if (context.depthTexture) {
9292
this._depthStencilTexture = new Texture({
9393
context : context,
9494
width : width,

Source/Scene/Imagery.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ define([
7272
this.texture.destroy();
7373
}
7474

75-
if (defined(this.textureWebMercator)) {
75+
if (defined(this.textureWebMercator) && this.texture !== this.textureWebMercator) {
7676
this.textureWebMercator.destroy();
7777
}
7878

Source/Scene/ImageryLayer.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -824,6 +824,9 @@ define([
824824
});
825825
this._reprojectComputeCommands.push(computeCommand);
826826
} else {
827+
if (needGeographicProjection) {
828+
imagery.texture = texture;
829+
}
827830
finalizeReprojectTexture(this, context, imagery, texture);
828831
}
829832
};

Source/Scene/OIT.js

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -113,19 +113,29 @@ define([
113113
function updateTextures(oit, context, width, height) {
114114
destroyTextures(oit);
115115

116+
// Use zeroed arraybuffer instead of null to initialize texture
117+
// to workaround Firefox 50. https://github.com/AnalyticalGraphicsInc/cesium/pull/4762
118+
var source = new Float32Array(width * height * 4);
119+
116120
oit._accumulationTexture = new Texture({
117121
context : context,
118-
width : width,
119-
height : height,
120122
pixelFormat : PixelFormat.RGBA,
121-
pixelDatatype : PixelDatatype.FLOAT
123+
pixelDatatype : PixelDatatype.FLOAT,
124+
source : {
125+
arrayBufferView : source,
126+
width : width,
127+
height : height
128+
}
122129
});
123130
oit._revealageTexture = new Texture({
124131
context : context,
125-
width : width,
126-
height : height,
127132
pixelFormat : PixelFormat.RGBA,
128-
pixelDatatype : PixelDatatype.FLOAT
133+
pixelDatatype : PixelDatatype.FLOAT,
134+
source : {
135+
arrayBufferView : source,
136+
width : width,
137+
height : height
138+
}
129139
});
130140
}
131141

Specs/Data/Images/Red256x256.png

742 Bytes
Loading

Specs/Scene/ImageryLayerSpec.js

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ defineSuite([
1717
'Scene/NeverTileDiscardPolicy',
1818
'Scene/QuadtreeTile',
1919
'Scene/SingleTileImageryProvider',
20+
'Scene/UrlTemplateImageryProvider',
2021
'Scene/WebMapServiceImageryProvider',
2122
'Specs/createScene',
2223
'Specs/pollToPromise'
@@ -38,6 +39,7 @@ defineSuite([
3839
NeverTileDiscardPolicy,
3940
QuadtreeTile,
4041
SingleTileImageryProvider,
42+
UrlTemplateImageryProvider,
4143
WebMapServiceImageryProvider,
4244
createScene,
4345
pollToPromise) {
@@ -271,6 +273,50 @@ defineSuite([
271273
});
272274
});
273275

276+
it('assigns texture property when reprojection is skipped because the tile is very small', function() {
277+
loadImage.createImage = function(url, crossOrigin, deferred) {
278+
loadImage.defaultCreateImage('Data/Images/Red256x256.png', crossOrigin, deferred);
279+
};
280+
281+
var provider = new UrlTemplateImageryProvider({
282+
url : 'http://example.com/{z}/{x}/{y}.png',
283+
minimumLevel : 13,
284+
maximumLevel: 19,
285+
rectangle : Rectangle.fromDegrees(13.39657249732205, 52.49127999816725, 13.42722986993895, 52.50998943590507)
286+
});
287+
var layer = new ImageryLayer(provider);
288+
289+
return pollToPromise(function() {
290+
return provider.ready;
291+
}).then(function() {
292+
var imagery = new Imagery(layer, 4400, 2686, 13);
293+
imagery.addReference();
294+
layer._requestImagery(imagery);
295+
296+
return pollToPromise(function() {
297+
return imagery.state === ImageryState.RECEIVED;
298+
}).then(function() {
299+
layer._createTexture(scene.context, imagery);
300+
301+
return pollToPromise(function() {
302+
return imagery.state === ImageryState.TEXTURE_LOADED;
303+
}).then(function() {
304+
layer._reprojectTexture(scene.frameState, imagery, true);
305+
layer.queueReprojectionCommands(scene.frameState);
306+
expect(scene.frameState.commandList.length).toBe(0);
307+
308+
return pollToPromise(function() {
309+
return imagery.state === ImageryState.READY;
310+
}).then(function() {
311+
expect(imagery.texture).toBeDefined();
312+
expect(imagery.texture).toBe(imagery.textureWebMercator);
313+
imagery.releaseReference();
314+
});
315+
});
316+
});
317+
});
318+
});
319+
274320
it('cancels reprojection', function() {
275321
var provider = createWebMercatorProvider();
276322
var layer = new ImageryLayer(provider);

0 commit comments

Comments
 (0)