Detailed Description
Draws every primitive of a scene with its world transform, in the shading modes of the Geometry viewer, and the lights and cameras of the scene as line gizmos. Part of the viewer's renderer, on the render thread.
The scene is walked when it changes, not every frame. A mesh is uploaded once, and kept for as long as the buffers of its primitive stay the same: a scene whose transforms only move does not upload anything again.
Public Member Functions | |
| SceneDrawer (const GeometryViewerNode &node) | |
| SceneDrawer (const SceneDrawer &)=delete | |
| SceneDrawer & | operator= (const SceneDrawer &)=delete |
| bool | setScene (const ossia::scene_spec &scene) override |
| The scene the renderer received; returns whether it is another one. | |
| bool | active () const noexcept override |
| const ossia::aabb & | bounds () const noexcept override |
| The bounds of what is drawn, in the space of the scene. | |
| void | update (score::gfx::RenderList &renderer, QRhiResourceUpdateBatch &res, score::gfx::PassMap &passes, QRhiBuffer *processUBO, QRhiBuffer *cameraUBO, const SceneView &view) override |
| Once the passes of the renderer exist for the frame. | |
| void | draw (score::gfx::RenderList &renderer, QRhiCommandBuffer &cb, score::gfx::Edge &edge) override |
| bool | hasLines () const noexcept override |
| The gizmos and the outline of the selected object. | |
| void | drawLines (score::gfx::RenderList &renderer, QRhiCommandBuffer &cb, score::gfx::Edge &edge, QRhiGraphicsPipeline *lines, QRhiShaderResourceBindings *srb) override |
| With the line pipeline of the guides: world-space positions and colours. | |
| void | release () override |
Member Function Documentation
◆ active()
|
inlineoverridevirtualnoexcept |
The scene needs more than the single geometry the renderer draws on its own: several primitives, transforms, lights or cameras
Implements score::gfx::ModelSceneDrawer.
◆ bounds()
|
inlineoverridevirtualnoexcept |
The bounds of what is drawn, in the space of the scene.
Implements score::gfx::ModelSceneDrawer.
◆ draw()
|
overridevirtual |
Implements score::gfx::ModelSceneDrawer.
◆ drawLines()
|
overridevirtual |
With the line pipeline of the guides: world-space positions and colours.
Implements score::gfx::ModelSceneDrawer.
◆ hasLines()
|
inlineoverridevirtualnoexcept |
The gizmos and the outline of the selected object.
Implements score::gfx::ModelSceneDrawer.
◆ release()
|
overridevirtual |
The GPU resources go away, the scene stays: the next update uploads it again
Implements score::gfx::ModelSceneDrawer.
◆ setScene()
|
overridevirtual |
The scene the renderer received; returns whether it is another one.
Implements score::gfx::ModelSceneDrawer.
◆ update()
|
overridevirtual |
Once the passes of the renderer exist for the frame.
Implements score::gfx::ModelSceneDrawer.
The documentation for this class was generated from the following file: