Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-52947

Qt 3D unexpectedly remembers the old content of files pointed by sources of QTextureImage instances

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P2: Important P2: Important
    • 5.7.1
    • 5.6.0
    • Qt3D
    • None

      This is better explained with a set of steps:

      1. Create a QTextureImage and give a file path to its source property.
      2. Modify the file in that file path (e.g. replace it with a different image). The QTextureImage keeps showing the old file, as expected, because the file was loaded and converted into a texture in memory before the file changed.
      3. Create a new QTextureImage and give the same file path to its source property.

      Expected: The new QTextureImage loads the modified file.
      Actual: The new QTextureImage loads the old version of the file, before it was changed in the file system.

      If Qt 3D keeps track of loaded texture images somehow, it should do either or both of the following:

      • When creating a new image, if the file in the file system has changed since it was last used for a texture, create a new texture using the new file. Textures created before the file changed in the filesystem should probably stay the way they were when created.
      • QTextureImage should provide some function to reload the texture from the file system, so that if I change the file locally in place and want textures using that file to show the new version of the file, I can call such a function in all affected instances of QTextureImage.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            whagen Wieland Hagen
            gallaecio Adrián Chaves Fernández
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes