Layer QML Type

Layer provides a way of filtering which entities will be rendered. More...

Import Statement: import Qt3D.Render 2.0
Since: Qt 5.5
Instantiates: QLayer
Inherits:

Component3D

Detailed Description

Layer works in conjunction with the LayerFilter in the FrameGraph.

Layer doesn't define any new properties but is supposed to only be referenced.


  import Qt3D.Core 2.0
  import Qt3D.Render 2.0

  Entity {
      id: root

      components: RenderSettings {
          // FrameGraph
          Viewport {
              ClearBuffers {
                  buffers: ClearBuffers.ColorDepthBuffer
                  CameraSelector {
                      camera: mainCamera
                      LayerFilter {
                          layers: [layer1]
                      }
                  }
              }
          }
      }

      // Scene
      Camera { id: mainCamera }

      Layer { id: layer1 }

      GeometryRenderer { id: mesh }

      Entity {
          id: renderableEntity
          components: [ mesh, layer1 ]
      }
  }

See also LayerFilter.