Jump to content

Delay texture loading bug


Recommended Posts

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 {

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) {
  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)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...