Skip to content

Commit

Permalink
Merge pull request CesiumGS#1589 from AnalyticalGraphicsInc/replaceGe…
Browse files Browse the repository at this point in the history
…tSetScene

Replace get/set functions with properties : Scene
  • Loading branch information
pjcozzi committed Mar 31, 2014
2 parents 0ef2bf8 + e614074 commit 700b5eb
Show file tree
Hide file tree
Showing 31 changed files with 724 additions and 738 deletions.
8 changes: 4 additions & 4 deletions Apps/CesiumViewer/CesiumViewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,10 @@ define([
var scene = viewer.scene;
var context = scene.context;
if (endUserOptions.debug) {
context.setValidateShaderProgram(true);
context.setValidateFramebuffer(true);
context.setLogShaderCompilation(true);
context.setThrowOnWebGLError(true);
context.validateShaderProgram = true;
context.validateFramebuffer = true;
context.logShaderCompilation = true;
context.throwOnWebGLError = true;
}

if (defined(endUserOptions.source)) {
Expand Down
2 changes: 1 addition & 1 deletion Apps/Sandcastle/gallery/Imagery Adjustment.html
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
}

function updateSliders() {
if (imageryLayers.getLength() > 0) {
if (imageryLayers.length > 0) {
var layer = imageryLayers.get(0);
brightnessSlider.set('value', layer.brightness);
contrastSlider.set('value', layer.contrast);
Expand Down
12 changes: 12 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,18 @@ Beta Releases
* `getEnd` -> `end`
* `getStartHeading` -> `startHeading`
* `getEndHeading` -> `endHeading`
* `AnimationCollection`
* `getAll` -> `all`
* `CentralBodySurface`
* `getTerrainProvider`, `setTerrainProvider` -> `terrainProvider`
* `Credit`
* `getText` -> `text`
* `getImageUrl` -> `imageUrl`
* `getLink` -> `link`
* `TerrainData`, `HightmapTerrainData`, `QuanitzedMeshTerrainData`
* `getWaterMask` -> `waterMask`
* `Tile`
* `getChildren` -> `children`
* `Buffer`
* `getSizeInBytes` -> `sizeInBytes`
* `getUsage` -> `usage`
Expand Down
2 changes: 1 addition & 1 deletion Source/Renderer/AutomaticUniforms.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ define([
});

AutomaticUniform.prototype.getDeclaration = function(name) {
var declaration = 'uniform ' + this.datatype.getGLSL() + ' ' + name;
var declaration = 'uniform ' + this.datatype.glsl + ' ' + name;

var size = this.size;
if (size === 1) {
Expand Down
18 changes: 8 additions & 10 deletions Source/Renderer/CubeMap.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,12 @@ define([
get : function() {
return this._flipY;
}
},

_target : {
get : function() {
return this._textureTarget;
}
}
});

Expand All @@ -273,9 +279,9 @@ define([
* // Generate mipmaps, and then set the sampler so mipmaps are used for
* // minification when the cube map is sampled.
* cubeMap.generateMipmap();
* cubeMap.setSampler(context.createSampler({
* cubeMap.sampler = context.createSampler({
* minificationFilter : Cesium.TextureMinificationFilter.NEAREST_MIPMAP_LINEAR
* }));
* });
*/
CubeMap.prototype.generateMipmap = function(hint) {
hint = defaultValue(hint, MipmapHint.DONT_CARE);
Expand All @@ -298,14 +304,6 @@ define([
gl.bindTexture(target, null);
};

CubeMap.prototype._getTexture = function() {
return this._texture;
};

CubeMap.prototype._getTarget = function() {
return this._textureTarget;
};

/**
* Returns true if this object was destroyed; otherwise, false.
* <br /><br />
Expand Down
14 changes: 6 additions & 8 deletions Source/Renderer/CubeMapFace.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ define([
get : function() {
return this._pixelDatatype;
}
},

_target : {
get : function() {
return this._targetFace;
}
}
});

Expand Down Expand Up @@ -189,13 +195,5 @@ define([
gl.bindTexture(target, null);
};

CubeMapFace.prototype._getTexture = function() {
return this._texture;
};

CubeMapFace.prototype._getTarget = function() {
return this._targetFace;
};

return CubeMapFace;
});
2 changes: 1 addition & 1 deletion Source/Renderer/Framebuffer.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ define([

function attachTexture(framebuffer, attachment, texture) {
var gl = framebuffer._gl;
gl.framebufferTexture2D(gl.FRAMEBUFFER, attachment, texture._getTarget(), texture._getTexture(), 0);
gl.framebufferTexture2D(gl.FRAMEBUFFER, attachment, texture._target, texture._texture, 0);
}

function attachRenderbuffer(framebuffer, attachment, renderbuffer) {
Expand Down
Loading

0 comments on commit 700b5eb

Please sign in to comment.