|
@@ -10366,7 +10366,7 @@ var BABYLON;
|
|
}
|
|
}
|
|
this._currentEffect = null;
|
|
this._currentEffect = null;
|
|
// 6/8/2017: deltakosh: Should not be required anymore.
|
|
// 6/8/2017: deltakosh: Should not be required anymore.
|
|
- // This message is then mostly for the future myself which will scream out loud when seeing that actually it was required :)
|
|
|
|
|
|
+ // This message is then mostly for the future myself who will scream out loud when seeing that it was actually required :)
|
|
if (bruteForce) {
|
|
if (bruteForce) {
|
|
this.resetTextureCache();
|
|
this.resetTextureCache();
|
|
this._currentProgram = null;
|
|
this._currentProgram = null;
|
|
@@ -10678,7 +10678,7 @@ var BABYLON;
|
|
this._gl.generateMipmap(this._gl.TEXTURE_2D);
|
|
this._gl.generateMipmap(this._gl.TEXTURE_2D);
|
|
}
|
|
}
|
|
this._bindTextureDirectly(this._gl.TEXTURE_2D, null);
|
|
this._bindTextureDirectly(this._gl.TEXTURE_2D, null);
|
|
- this.resetTextureCache();
|
|
|
|
|
|
+ // this.resetTextureCache();
|
|
texture.isReady = true;
|
|
texture.isReady = true;
|
|
};
|
|
};
|
|
Engine.prototype.createRawTexture = function (data, width, height, format, generateMipMaps, invertY, samplingMode, compression, type) {
|
|
Engine.prototype.createRawTexture = function (data, width, height, format, generateMipMaps, invertY, samplingMode, compression, type) {
|
|
@@ -10719,7 +10719,7 @@ var BABYLON;
|
|
width = this.needPOTTextures ? BABYLON.Tools.GetExponentOfTwo(width, this._caps.maxTextureSize) : width;
|
|
width = this.needPOTTextures ? BABYLON.Tools.GetExponentOfTwo(width, this._caps.maxTextureSize) : width;
|
|
height = this.needPOTTextures ? BABYLON.Tools.GetExponentOfTwo(height, this._caps.maxTextureSize) : height;
|
|
height = this.needPOTTextures ? BABYLON.Tools.GetExponentOfTwo(height, this._caps.maxTextureSize) : height;
|
|
}
|
|
}
|
|
- this.resetTextureCache();
|
|
|
|
|
|
+ // this.resetTextureCache();
|
|
texture.width = width;
|
|
texture.width = width;
|
|
texture.height = height;
|
|
texture.height = height;
|
|
texture.isReady = false;
|
|
texture.isReady = false;
|
|
@@ -10770,7 +10770,7 @@ var BABYLON;
|
|
if (premulAlpha) {
|
|
if (premulAlpha) {
|
|
this._gl.pixelStorei(this._gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, 0);
|
|
this._gl.pixelStorei(this._gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, 0);
|
|
}
|
|
}
|
|
- this.resetTextureCache();
|
|
|
|
|
|
+ // this.resetTextureCache();
|
|
texture.isReady = true;
|
|
texture.isReady = true;
|
|
};
|
|
};
|
|
Engine.prototype.updateVideoTexture = function (texture, video, invertY) {
|
|
Engine.prototype.updateVideoTexture = function (texture, video, invertY) {
|
|
@@ -10812,7 +10812,7 @@ var BABYLON;
|
|
this._gl.generateMipmap(this._gl.TEXTURE_2D);
|
|
this._gl.generateMipmap(this._gl.TEXTURE_2D);
|
|
}
|
|
}
|
|
this._bindTextureDirectly(this._gl.TEXTURE_2D, null);
|
|
this._bindTextureDirectly(this._gl.TEXTURE_2D, null);
|
|
- this.resetTextureCache();
|
|
|
|
|
|
+ // this.resetTextureCache();
|
|
texture.isReady = true;
|
|
texture.isReady = true;
|
|
}
|
|
}
|
|
catch (ex) {
|
|
catch (ex) {
|
|
@@ -10884,7 +10884,7 @@ var BABYLON;
|
|
texture.type = fullOptions.type;
|
|
texture.type = fullOptions.type;
|
|
texture._generateDepthBuffer = fullOptions.generateDepthBuffer;
|
|
texture._generateDepthBuffer = fullOptions.generateDepthBuffer;
|
|
texture._generateStencilBuffer = fullOptions.generateStencilBuffer ? true : false;
|
|
texture._generateStencilBuffer = fullOptions.generateStencilBuffer ? true : false;
|
|
- this.resetTextureCache();
|
|
|
|
|
|
+ // this.resetTextureCache();
|
|
this._internalTexturesCache.push(texture);
|
|
this._internalTexturesCache.push(texture);
|
|
return texture;
|
|
return texture;
|
|
};
|
|
};
|
|
@@ -11111,7 +11111,7 @@ var BABYLON;
|
|
texture._depthStencilBuffer = this._setupFramebufferDepthAttachments(generateStencilBuffer, generateDepthBuffer, size, size);
|
|
texture._depthStencilBuffer = this._setupFramebufferDepthAttachments(generateStencilBuffer, generateDepthBuffer, size, size);
|
|
// Mipmaps
|
|
// Mipmaps
|
|
if (texture.generateMipMaps) {
|
|
if (texture.generateMipMaps) {
|
|
- this._bindTextureDirectly(gl.TEXTURE_CUBE_MAP, texture);
|
|
|
|
|
|
+ // this._bindTextureDirectly(gl.TEXTURE_CUBE_MAP, texture);
|
|
gl.generateMipmap(gl.TEXTURE_CUBE_MAP);
|
|
gl.generateMipmap(gl.TEXTURE_CUBE_MAP);
|
|
}
|
|
}
|
|
// Unbind
|
|
// Unbind
|
|
@@ -11122,7 +11122,7 @@ var BABYLON;
|
|
texture.width = size;
|
|
texture.width = size;
|
|
texture.height = size;
|
|
texture.height = size;
|
|
texture.isReady = true;
|
|
texture.isReady = true;
|
|
- this.resetTextureCache();
|
|
|
|
|
|
+ //this.resetTextureCache();
|
|
this._internalTexturesCache.push(texture);
|
|
this._internalTexturesCache.push(texture);
|
|
return texture;
|
|
return texture;
|
|
};
|
|
};
|
|
@@ -11340,7 +11340,7 @@ var BABYLON;
|
|
gl.texParameteri(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
|
|
gl.texParameteri(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
|
|
gl.texParameteri(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
|
|
gl.texParameteri(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
|
|
this._bindTextureDirectly(gl.TEXTURE_CUBE_MAP, null);
|
|
this._bindTextureDirectly(gl.TEXTURE_CUBE_MAP, null);
|
|
- this.resetTextureCache();
|
|
|
|
|
|
+ // this.resetTextureCache();
|
|
};
|
|
};
|
|
Engine.prototype.updateRawCubeTexture = function (texture, data, format, type, invertY, compression, level) {
|
|
Engine.prototype.updateRawCubeTexture = function (texture, data, format, type, invertY, compression, level) {
|
|
if (compression === void 0) { compression = null; }
|
|
if (compression === void 0) { compression = null; }
|
|
@@ -11382,7 +11382,7 @@ var BABYLON;
|
|
this._gl.generateMipmap(this._gl.TEXTURE_CUBE_MAP);
|
|
this._gl.generateMipmap(this._gl.TEXTURE_CUBE_MAP);
|
|
}
|
|
}
|
|
this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP, null);
|
|
this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP, null);
|
|
- this.resetTextureCache();
|
|
|
|
|
|
+ // this.resetTextureCache();
|
|
texture.isReady = true;
|
|
texture.isReady = true;
|
|
};
|
|
};
|
|
Engine.prototype.createRawCubeTexture = function (data, size, format, type, generateMipMaps, invertY, samplingMode, compression) {
|
|
Engine.prototype.createRawCubeTexture = function (data, size, format, type, generateMipMaps, invertY, samplingMode, compression) {
|
|
@@ -11489,7 +11489,7 @@ var BABYLON;
|
|
_this.updateRawCubeTexture(texture, faceDataArrays, format, type, invertY);
|
|
_this.updateRawCubeTexture(texture, faceDataArrays, format, type, invertY);
|
|
}
|
|
}
|
|
texture.isReady = true;
|
|
texture.isReady = true;
|
|
- _this.resetTextureCache();
|
|
|
|
|
|
+ // this.resetTextureCache();
|
|
scene._removePendingData(texture);
|
|
scene._removePendingData(texture);
|
|
if (onLoad) {
|
|
if (onLoad) {
|
|
onLoad();
|
|
onLoad();
|
|
@@ -11525,7 +11525,7 @@ var BABYLON;
|
|
this._gl.generateMipmap(this._gl.TEXTURE_3D);
|
|
this._gl.generateMipmap(this._gl.TEXTURE_3D);
|
|
}
|
|
}
|
|
this._bindTextureDirectly(this._gl.TEXTURE_3D, null);
|
|
this._bindTextureDirectly(this._gl.TEXTURE_3D, null);
|
|
- this.resetTextureCache();
|
|
|
|
|
|
+ // this.resetTextureCache();
|
|
texture.isReady = true;
|
|
texture.isReady = true;
|
|
};
|
|
};
|
|
Engine.prototype.createRawTexture3D = function (data, width, height, depth, format, generateMipMaps, invertY, samplingMode, compression) {
|
|
Engine.prototype.createRawTexture3D = function (data, width, height, depth, format, generateMipMaps, invertY, samplingMode, compression) {
|
|
@@ -11569,7 +11569,7 @@ var BABYLON;
|
|
gl.generateMipmap(gl.TEXTURE_2D);
|
|
gl.generateMipmap(gl.TEXTURE_2D);
|
|
}
|
|
}
|
|
this._bindTextureDirectly(gl.TEXTURE_2D, null);
|
|
this._bindTextureDirectly(gl.TEXTURE_2D, null);
|
|
- this.resetTextureCache();
|
|
|
|
|
|
+ // this.resetTextureCache();
|
|
if (scene) {
|
|
if (scene) {
|
|
scene._removePendingData(texture);
|
|
scene._removePendingData(texture);
|
|
}
|
|
}
|
|
@@ -11586,7 +11586,7 @@ var BABYLON;
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
if (!texture._webGLTexture) {
|
|
if (!texture._webGLTexture) {
|
|
- this.resetTextureCache();
|
|
|
|
|
|
+ // this.resetTextureCache();
|
|
if (scene) {
|
|
if (scene) {
|
|
scene._removePendingData(texture);
|
|
scene._removePendingData(texture);
|
|
}
|
|
}
|