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

Changing the image source does not change the QQ3D texture.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • 5.15.17
    • Quick: 3D
    • None
    • Windows

      In a Material that uses an Image as the source item for the QQ3D Texture, even if the source of the Image is changed, the Texture display is not changed.

      The QML code is as follows.

      import QtQuick 2.15
      import QtQuick3D 1.15
      
      Item {
          id: root
          objectName: "DisplayArea3D.qml"
          implicitWidth: 1000
          implicitHeight: 760
          clip: true
          property alias source: image.source
          Node{
              id: mainScene
              DirectionalLight{
                  ambientColor: "#cccccc"
                  eulerRotation.x: 0
                  eulerRotation.y: 0
                  eulerRotation.z: 0
                  brightness: 100
              }
              Model {
                  source: "#Rectangle"
                  materials: DefaultMaterial {
                      diffuseMap: Texture {
                          id: texture
                          sourceItem: Image {
                              id: image
                          }
                      }
                  }
              }
              PerspectiveCamera {
                  id: sceneCamera
                  fieldOfView: 45
                  x: 0
                  y: -500
                  z: 500
                  eulerRotation.x: 45
              }
          }
          Rectangle{
              id: container
              anchors.fill: parent
              border.color: "black"
              gradient: Gradient{
                  GradientStop{position: 0.0; color: "#000000"}
                  GradientStop{position: 1.0; color: "#7F7FFF"}
              }
              View3D{
                  id: mainView
                  anchors.fill: parent
                  importScene: mainScene
                  camera: sceneCamera
                  renderMode: View3D.Offscreen
              }
              Text {
                  text: root.source
                  color: "white"
                  font.pixelSize: 24
              }
          }
      }
      

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

            qt.team.graphics.and.multimedia Qt Graphics Team
            susumuendo Susumu Endo
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes