|
@@ -58,7 +58,7 @@
|
|
};
|
|
};
|
|
|
|
|
|
var prepareWebGLTexture = function (texture, gl, scene, width, height, invertY, noMipmap, isCompressed, processFunction, samplingMode) {
|
|
var prepareWebGLTexture = function (texture, gl, scene, width, height, invertY, noMipmap, isCompressed, processFunction, samplingMode) {
|
|
- if (typeof samplingMode === "undefined") { samplingMode = BABYLON.Texture.TRILINEAR_SAMPLINGMODE; }
|
|
|
|
|
|
+ if (typeof samplingMode === "undefined") { samplingMode = Texture.TRILINEAR_SAMPLINGMODE; }
|
|
var engine = scene.getEngine();
|
|
var engine = scene.getEngine();
|
|
var potWidth = getExponantOfTwo(width, engine.getCaps().maxTextureSize);
|
|
var potWidth = getExponantOfTwo(width, engine.getCaps().maxTextureSize);
|
|
var potHeight = getExponantOfTwo(height, engine.getCaps().maxTextureSize);
|
|
var potHeight = getExponantOfTwo(height, engine.getCaps().maxTextureSize);
|
|
@@ -920,7 +920,7 @@
|
|
|
|
|
|
Engine.prototype.createTexture = function (url, noMipmap, invertY, scene, samplingMode) {
|
|
Engine.prototype.createTexture = function (url, noMipmap, invertY, scene, samplingMode) {
|
|
var _this = this;
|
|
var _this = this;
|
|
- if (typeof samplingMode === "undefined") { samplingMode = BABYLON.Texture.TRILINEAR_SAMPLINGMODE; }
|
|
|
|
|
|
+ if (typeof samplingMode === "undefined") { samplingMode = Texture.TRILINEAR_SAMPLINGMODE; }
|
|
var texture = this._gl.createTexture();
|
|
var texture = this._gl.createTexture();
|
|
|
|
|
|
var extension = url.substr(url.length - 4, 4).toLowerCase();
|
|
var extension = url.substr(url.length - 4, 4).toLowerCase();
|
|
@@ -940,7 +940,7 @@
|
|
var header = BABYLON.Internals.TGATools.GetTGAHeader(data);
|
|
var header = BABYLON.Internals.TGATools.GetTGAHeader(data);
|
|
|
|
|
|
prepareWebGLTexture(texture, _this._gl, scene, header.width, header.height, invertY, noMipmap, false, function () {
|
|
prepareWebGLTexture(texture, _this._gl, scene, header.width, header.height, invertY, noMipmap, false, function () {
|
|
- BABYLON.Internals.TGATools.UploadContent(_this._gl, data);
|
|
|
|
|
|
+ Internals.TGATools.UploadContent(_this._gl, data);
|
|
}, samplingMode);
|
|
}, samplingMode);
|
|
}, null, scene.database, true);
|
|
}, null, scene.database, true);
|
|
} else if (isDDS) {
|
|
} else if (isDDS) {
|
|
@@ -950,7 +950,7 @@
|
|
var loadMipmap = (info.isRGB || info.isLuminance || info.mipmapCount > 1) && !noMipmap && ((info.width >> (info.mipmapCount - 1)) == 1);
|
|
var loadMipmap = (info.isRGB || info.isLuminance || info.mipmapCount > 1) && !noMipmap && ((info.width >> (info.mipmapCount - 1)) == 1);
|
|
prepareWebGLTexture(texture, _this._gl, scene, info.width, info.height, invertY, !loadMipmap, info.isFourCC, function () {
|
|
prepareWebGLTexture(texture, _this._gl, scene, info.width, info.height, invertY, !loadMipmap, info.isFourCC, function () {
|
|
console.log("loading " + url);
|
|
console.log("loading " + url);
|
|
- BABYLON.Internals.DDSTools.UploadDDSLevels(_this._gl, _this.getCaps().s3tc, data, info, loadMipmap, 1);
|
|
|
|
|
|
+ Internals.DDSTools.UploadDDSLevels(_this._gl, _this.getCaps().s3tc, data, info, loadMipmap, 1);
|
|
}, samplingMode);
|
|
}, samplingMode);
|
|
}, null, scene.database, true);
|
|
}, null, scene.database, true);
|
|
} else {
|
|
} else {
|
|
@@ -1137,7 +1137,7 @@
|
|
gl.bindTexture(gl.TEXTURE_CUBE_MAP, texture);
|
|
gl.bindTexture(gl.TEXTURE_CUBE_MAP, texture);
|
|
gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, 1);
|
|
gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, 1);
|
|
|
|
|
|
- BABYLON.Internals.DDSTools.UploadDDSLevels(_this._gl, _this.getCaps().s3tc, data, info, loadMipmap, 6);
|
|
|
|
|
|
+ Internals.DDSTools.UploadDDSLevels(_this._gl, _this.getCaps().s3tc, data, info, loadMipmap, 6);
|
|
|
|
|
|
if (!noMipmap && !info.isFourCC && info.mipmapCount == 1) {
|
|
if (!noMipmap && !info.isFourCC && info.mipmapCount == 1) {
|
|
gl.generateMipmap(gl.TEXTURE_CUBE_MAP);
|
|
gl.generateMipmap(gl.TEXTURE_CUBE_MAP);
|
|
@@ -1405,4 +1405,3 @@
|
|
})();
|
|
})();
|
|
BABYLON.Engine = Engine;
|
|
BABYLON.Engine = Engine;
|
|
})(BABYLON || (BABYLON = {}));
|
|
})(BABYLON || (BABYLON = {}));
|
|
-//# sourceMappingURL=babylon.engine.js.map
|
|
|