Better_Software_Header_MobileBetter_Software_Header_Web

Find what you need - explore our website and developer resources

Qt3D 2.0 The FrameGraph

FrameGraph NodeDescription
ClearBufferSpecify which OpenGL buffers should be cleared
CameraSelectorSpecifies which camera should be used to perform the rendering
LayerFilterSpecifies which entities to renderer by filtering all Entity that have a matching Layer Components
ViewportDefines a rectangular viewport where the scene will be drawn
TechniqueFilterDefines the annotations (criteria) to be used to select the best matching Technique in a Material
RenderPassFilterDefines the annotiations (criteria) to be used to select the best matching RenderPass in a Technique
RenderTargetSelectorSpecifies which RenderTarget (FBO + Attachment) should be used for rendering
SortMethodSpecifies how the renderer should sort rendering commands
Entity {
    id: sceneRoot
    components: FrameGraph {
         activeFrameGraph: ... // FrameGraph tree
    }
}
Entity {
    id: sceneRoot
    components: FrameGraph {
         ... // FrameGraph tree
    }
}
Viewport {
     rect: Qt.rect(0.0, 0.0, 1.0, 1.0)
     property alias camera: cameraSelector.camera

     ClearBuffer {
          buffers: ClearBuffer.ColorDepthBuffer

          CameraSelector {
               id: cameraSelector
          }
     }
}
Viewport {
     rect: Qt.rect(0.0, 0.0, 1.0, 1.0)
     property alias camera: cameraSelector.camera

     CameraSelector {
          id: cameraSelector

          ClearBuffer {
               buffers: ClearBuffer.ColorDepthBuffer
          }
     }
}
CameraSelector {
      Viewport {
           rect: Qt.rect(0.0, 0.0, 1.0, 1.0)

           ClearBuffer {
                buffers: ClearBuffer.ColorDepthBuffer
           }
      }
}
Viewport {
     id: mainViewport
     rect: Qt.rect(0, 0, 1, 1)
     property alias Camera: cameraSelectorTopLeftViewport.camera
     property alias Camera: cameraSelectorTopRightViewport.camera
     property alias Camera: cameraSelectorBottomLeftViewport.camera
     property alias Camera: cameraSelectorBottomRightViewport.camera

     ClearBuffer {
          buffers: ClearBuffer.ColorDepthBuffer
     }

     Viewport {
          id: topLeftViewport
          rect: Qt.rect(0, 0, 0.5, 0.5)
          CameraSelector { id: cameraSelectorTopLeftViewport }
     }

     Viewport {
          id: topRightViewport
          rect: Qt.rect(0.5, 0, 0.5, 0.5)
          CameraSelector { id: cameraSelectorTopRightViewport }
     }

     Viewport {
          id: bottomLeftViewport
          rect: Qt.rect(0, 0.5, 0.5, 0.5)
          CameraSelector { id: cameraSelectorBottomLeftViewport }
     }

     Viewport {
          id: bottomRightViewport
          rect: Qt.rect(0.5, 0.5, 0.5, 0.5)
          CameraSelector { id: cameraSelectorBottomRightViewport }
     }
}
Viewport {
     rect: Qt.rect(0.0, 0.0, 1.0, 1.0)

     property alias gBuffer: gBufferTargetSelector.target
     property alias camera: sceneCameraSelector.camera

     LayerFilter {
          layers: "scene"

          RenderTargetSelector {
                id: gBufferTargetSelector

                ClearBuffer {
                     buffers: ClearBuffer.ColorDepthBuffer

                     RenderPassFilter {
                           id: geometryPass
                           includes: Annotation { name: "pass"; value: "geometry" }

                           CameraSelector {
                                 id: sceneCameraSelector
                           }
                     }
                }
          }
     }

     LayerFilter {
          layers: "screenQuad"

          ClearBuffer {
               buffers: ClearBuffer.ColorDepthBuffer

               RenderPassFilter {
                     id: finalPass
                     includes: Annotation { name: "pass"; value: "final" }
               }
         }
     }
}

About KDAB


8 Comments

2 - Mar - 2015

jiangcaiyang

2 - Mar - 2015

Paul Lemire

3 - Mar - 2015

jiangcaiyang

3 - Mar - 2015

Paul Lemire

30 - May - 2015

Andrey

30 - May - 2015

Paul Lemire

3 - Apr - 2018

Jeff Flinn

4 - Apr - 2018

Paul Lemire

PaulLemire

Paul Lemire

Senior Software Engineer