Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. import Qt3D.scene3D doesn't work !
Forum Updated to NodeBB v4.3 + New Features

import Qt3D.scene3D doesn't work !

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
2 Posts 2 Posters 406 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    signalK
    wrote on last edited by signalK
    #1

    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

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

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

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved