import Qt3D.scene3D doesn't work !



  • Hi,

    I can not implement DefaultSceneEntity in this example:

    import Qt3D.Core 2.0
    import Qt3D.Render 2.0
    import Qt3D.Input 2.0
    import Qt3D.Extras 2.0

    DefaultSceneEntity {

    id: scene
    
    Entity{
         components: [
         SphereMesh {
                 radius: 1
                 rings: 60
                 slices: 30 
             },
          Material {
              effect: Effect{
                  techniques: [
                      Technique {
                          filterKeys:FilterKey {name: "renderingStyle";value: "forward"}
                          graphicsApiFilter {
                              api: GraphicsApiFilter.OpenGL
                              majorVersion: 3
                              minorVersion: 2
                              profile: GraphicsApiFilter.CoreProfile
                          }
                          renderPasses: RenderPass {
                              shaderProgram:ShaderProgram {
                                  vertexShaderCode: loadSource("qrc:/customshader.vert")
                                  fragmentShaderCode: loadSource("qrc:/customshader.frag")
                                  
                              }
                          }
                          }
    
                  ]
              }
             }
    
         ]
         
    }
    

    }

    It seems that it belongs to the class Qt3D.scene3D but this one does not look importable.Why?
    Which class to import so that DefautSceneEntity is recognized?

    thanks


  • Lifetime Qt Champion

    Hi,

    Did you add the corresponding modules to your .pro file ?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.