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

Quick3D Texture might not capture the latest state of sourceItem

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 6.1.1, 6.2.0 Alpha
    • 5.15.3, 6.2
    • Quick: 3D
    • None
    • Linux/Wayland
    • 1175b485cde831fb73056d02cf17981658026b78 (qt/qtquick3d/dev) f42356443d7abed66acf48104064c07076637d53 (qt/qtquick3d/6.1)
    • Qt Quick 3D - 2021 Week 17/18

    Description

      In the following example, texture color should be flipped by pressing R key, but it's actually delayed until another updating request (e.g. resizing the window.)

      I can see this problem on dev branch, too.

          property bool red3D: false
      
          Shortcut {
              sequence: "R"
              onActivated: {
                  root.red3D = !root.red3D;
              }
          }
      
          View3D {
              width: 100
              height: 100
      
              OrthographicCamera {
                  position: Qt.vector3d(0, 0, 100)
              }
      
              Model {
                  source: "#Rectangle"
                  materials: DefaultMaterial {
                      lighting: DefaultMaterial.NoLighting
                      diffuseMap: Texture {
                          sourceItem: Rectangle {
                              width: 100
                              height: 100
                              color: root.red3D ? "red" : "lightgray"
                          }
                      }
                  }
              }
          }
      

      (full QML source is attached)

      Attachments

        Issue Links

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

          Activity

            People

              lagocs Laszlo Agocs
              jirauser52013 user-c858f (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes