|
@@ -8,11 +8,9 @@ var BABYLON;
|
|
(function (BABYLON) {
|
|
(function (BABYLON) {
|
|
var Texture = (function (_super) {
|
|
var Texture = (function (_super) {
|
|
__extends(Texture, _super);
|
|
__extends(Texture, _super);
|
|
-<<<<<<< HEAD
|
|
|
|
- function Texture(url, scene, noMipmap, invertY, samplingMode, buffer, deleteBuffer) {
|
|
|
|
-=======
|
|
|
|
- function Texture(url, scene, noMipmap, invertY, samplingMode, onLoad, onError) {
|
|
|
|
->>>>>>> 08f8d5bd302ffec3b0c263e3d9b3a73544899aa5
|
|
|
|
|
|
+
|
|
|
|
+ function Texture(url, scene, noMipmap, invertY, samplingMode, onLoad, onError, buffer, deleteBuffer) {
|
|
|
|
+
|
|
if (typeof samplingMode === "undefined") { samplingMode = Texture.TRILINEAR_SAMPLINGMODE; }
|
|
if (typeof samplingMode === "undefined") { samplingMode = Texture.TRILINEAR_SAMPLINGMODE; }
|
|
if (typeof onLoad === "undefined") { onLoad = null; }
|
|
if (typeof onLoad === "undefined") { onLoad = null; }
|
|
if (typeof onError === "undefined") { onError = null; }
|
|
if (typeof onError === "undefined") { onError = null; }
|
|
@@ -41,14 +39,12 @@ var BABYLON;
|
|
|
|
|
|
if (!this._texture) {
|
|
if (!this._texture) {
|
|
if (!scene.useDelayedTextureLoading) {
|
|
if (!scene.useDelayedTextureLoading) {
|
|
-<<<<<<< HEAD
|
|
|
|
- this._texture = scene.getEngine().createTexture(url, noMipmap, invertY, scene, this._samplingMode, this._buffer);
|
|
|
|
- if (deleteBuffer) {
|
|
|
|
|
|
+
|
|
|
|
+ this._texture = scene.getEngine().createTexture(url, noMipmap, invertY, scene, this._samplingMode, onLoad, onError, this._buffer);
|
|
|
|
+ if (deleteBuffer) {
|
|
delete this._buffer;
|
|
delete this._buffer;
|
|
}
|
|
}
|
|
-=======
|
|
|
|
- this._texture = scene.getEngine().createTexture(url, noMipmap, invertY, scene, this._samplingMode, onLoad, onError);
|
|
|
|
->>>>>>> 08f8d5bd302ffec3b0c263e3d9b3a73544899aa5
|
|
|
|
|
|
+
|
|
} else {
|
|
} else {
|
|
this.delayLoadState = BABYLON.Engine.DELAYLOADSTATE_NOTLOADED;
|
|
this.delayLoadState = BABYLON.Engine.DELAYLOADSTATE_NOTLOADED;
|
|
}
|
|
}
|
|
@@ -63,7 +59,7 @@ var BABYLON;
|
|
this._texture = this._getFromCache(this.url, this._noMipmap);
|
|
this._texture = this._getFromCache(this.url, this._noMipmap);
|
|
|
|
|
|
if (!this._texture) {
|
|
if (!this._texture) {
|
|
- this._texture = this.getScene().getEngine().createTexture(this.url, this._noMipmap, this._invertY, this.getScene(), this._samplingMode, this._buffer);
|
|
|
|
|
|
+ this._texture = this.getScene().getEngine().createTexture(this.url, this._noMipmap, this._invertY, this.getScene(), this._samplingMode, null, null, this._buffer);
|
|
if (this._deleteBuffer) {
|
|
if (this._deleteBuffer) {
|
|
delete this._buffer;
|
|
delete this._buffer;
|
|
}
|
|
}
|