Quantcast
Channel: Bugs Latest Topics
Viewing all articles
Browse latest Browse all 760

Delay texture loading bug

$
0
0

I believe you have a bug in delayed texture loading where you lose the root URL, or perhaps in the implementation of createCubeTexture.

If delay load is disabled, you call createCubeTexture correctly using the "files" parameter.

  if (!scene.useDelayedTextureLoading) {
  this._texture = scene.getEngine().createCubeTexture(rootUrl, scene, files, noMipmap);
  }
  else {
  this.delayLoadState = BABYLON.Engine.DELAYLOADSTATE_NOTLOADED;
  }
   

If it is delay loaded, it appears you pass just extensions in place of files.  This causes the files to be attempted to be loaded from current path.

  if (this.delayLoadState !== BABYLON.Engine.DELAYLOADSTATE_NOTLOADED) {
  return;
  }
  this.delayLoadState = BABYLON.Engine.DELAYLOADSTATE_LOADED;
  this._texture = this._getFromCache(this.url, this._noMipmap);
  if (!this._texture) {
  this._texture = this.getScene().getEngine().createCubeTexture(this.url, this.getScene(), this._extensions);
  }
  };

I spent a while trying to understand why my rooturl was ignored, but disabling delayed texture loading seems to have fixed it.  (Had issues been enabled on the repo it may have been easier to find the problem)


Viewing all articles
Browse latest Browse all 760

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>