Skip to content

Commit

Permalink
Merge pull request xeolabs#481 from tsherif/texture-options
Browse files Browse the repository at this point in the history
Texture node listens for filter and wrap options.
  • Loading branch information
tsherif committed Apr 21, 2016
2 parents 8cd7010 + b6cf8a2 commit 8866a02
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 22 deletions.
12 changes: 1 addition & 11 deletions src/core/scene/_texture.js
Original file line number Diff line number Diff line change
Expand Up @@ -342,16 +342,6 @@ new (function () {
magFilter: this._getGLOption("magFilter", gl, layer, gl.LINEAR),
wrapS: this._getGLOption("wrapS", gl, layer, gl.REPEAT),
wrapT: this._getGLOption("wrapT", gl, layer, gl.REPEAT),
isDepth: this._getOption(layer.isDepth, false),
depthMode: this._getGLOption("depthMode", gl, layer, gl.LUMINANCE),
depthCompareMode: this._getGLOption("depthCompareMode", gl, layer, gl.COMPARE_R_TO_TEXTURE),
depthCompareFunc: this._getGLOption("depthCompareFunc", gl, layer, gl.LEQUAL),
flipY: this._getOption(layer.flipY, true),
width: this._getOption(layer.width, 1),
height: this._getOption(layer.height, 1),
internalFormat: this._getGLOption("internalFormat", gl, layer, gl.LEQUAL),
sourceFormat: this._getGLOption("sourceType", gl, layer, gl.ALPHA),
sourceType: this._getGLOption("sourceType", gl, layer, gl.UNSIGNED_BYTE),
update: null
});

Expand Down Expand Up @@ -555,4 +545,4 @@ new (function () {
}
};

})();
})();
16 changes: 5 additions & 11 deletions src/core/scene/texture.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ new (function () {
SceneJS._apply({
waitForLoad: params.waitForLoad == undefined ? true : params.waitForLoad,
texture: null,
minFilter: params.minFilter,
magFilter: params.magFilter,
wrapS: params.wrapS,
wrapT: params.wrapT,
uvLayerIdx: uvLayerIdx,
isNormalMap: params.applyTo === "normals",
applyFrom: applyFrom,
Expand Down Expand Up @@ -258,16 +262,6 @@ new (function () {
magFilter: this._getGLOption("magFilter", gl.LINEAR),
wrapS: this._getGLOption("wrapS", gl.REPEAT),
wrapT: this._getGLOption("wrapT", gl.REPEAT),
isDepth: this._getOption(this._core.isDepth, false),
depthMode: this._getGLOption("depthMode", gl.LUMINANCE),
depthCompareMode: this._getGLOption("depthCompareMode", gl.COMPARE_R_TO_TEXTURE),
depthCompareFunc: this._getGLOption("depthCompareFunc", gl.LEQUAL),
flipY: this._getOption(this._core.flipY, true),
width: this._getOption(this._core.width, 1),
height: this._getOption(this._core.height, 1),
internalFormat: this._getGLOption("internalFormat", gl.ALPHA),
sourceFormat: this._getGLOption("sourceFormat", gl.ALPHA),
sourceType: this._getGLOption("sourceType", gl.UNSIGNED_BYTE),
update: null
});

Expand Down Expand Up @@ -438,4 +432,4 @@ new (function () {
}
};

})();
})();

0 comments on commit 8866a02

Please sign in to comment.