![]() |
NDEVR
API Documentation
|
A GraphicsPipeline that is responsible for setting up and rendering the resources of a DesignObjectLookup. More...
Classes | |
| struct | GeometryUpdateObject |
| Tracks a geometry and its last modification time for incremental updates. More... | |
Public Types | |
| enum | AddObjectMode { e_add_object , e_ensure_pipeline , e_ensure_pipeline_and_add } |
| Modes for adding objects to the session. More... | |
Public Member Functions | |
| virtual | ~GraphicsSession () |
| Destructor. | |
| virtual void | addCamera (const UUID &object) |
| Adds a camera to this session. | |
| virtual bool | addRenderGeometry (const Geometry &geo)=0 |
| Adds a geometry for rendering. | |
| virtual DynamicPointer< GraphicsPipeline > | createRenderPipeline ()=0 |
| Creates a new render pipeline for a viewport. | |
| bool | isActive () const |
| Checks whether this session is active. | |
| virtual void | postClearAll () |
| Called after all scene objects have been cleared. | |
| virtual void | readShader (const StringView &shader)=0 |
| Reads and compiles a shader for use in rendering. | |
| virtual void | removeCamera (const UUID &camera) |
| Removes a camera from this session. | |
| virtual void | removeRenderGeometry (const Geometry &geo)=0 |
| Removes a geometry from rendering. | |
| void | setActive (bool active) |
| Sets whether this session is active. | |
| virtual UUID | uuid ()=0 |
| Returns the unique identifier for this session. | |
| Public Member Functions inherited from GraphicsPipeline | |
| virtual | ~GraphicsPipeline () |
| Destructor. | |
| virtual void | cleanResources ()=0 |
| Cleans up stale or unused GPU resources. | |
| virtual void | cleanup ()=0 |
| Releases all GPU resources. | |
| virtual void | commit (GraphicsUpdateArguments &args)=0 |
| Commits pending changes to the GPU. | |
| virtual bool | createPipeline (GraphicsUpdateArguments &args)=0 |
| Creates or recreates the rendering pipeline. | |
| virtual const ConstPointer< GraphicsDevice > & | device () const =0 |
| Returns the graphics device (const). | |
| virtual const DynamicPointer< GraphicsDevice > & | device ()=0 |
| Returns the graphics device. | |
| virtual void | drawFrame (GraphicsUpdateArguments &args)=0 |
| Renders a single frame. | |
| virtual void | ensureLastRenderComplete ()=0 |
| Blocks until the last submitted render is complete. | |
| virtual bool | hasCommand () const =0 |
| Checks whether there are pending commands to execute. | |
| virtual void | init (GraphicsUpdateArguments &args)=0 |
| Initializes the pipeline with the given arguments. | |
| virtual bool | runCommand (GraphicsUpdateArguments &args)=0 |
| Executes a queued rendering command. | |
| virtual void | setWindowInstance (WindowInstance *instance)=0 |
| Associates a window instance with this pipeline. | |
| virtual void | updateUniformBuffer (GraphicsUpdateArguments &args)=0 |
| Updates the camera uniform buffer on the GPU. | |
Protected Attributes | |
| Buffer< UUID > | m_added_cameras |
| Cameras registered with this session. | |
| bool | m_is_active = false |
| Whether this session is currently active. | |
| bool | m_needs_clear_all = false |
| Whether a full clear is pending. | |
| bool | m_needs_command_refresh = false |
| Whether command buffers need refreshing. | |
A GraphicsPipeline that is responsible for setting up and rendering the resources of a DesignObjectLookup.
Definition at line 21 of file GraphicsSession.h.
Modes for adding objects to the session.
| Enumerator | |
|---|---|
| e_add_object | Add the object only. |
| e_ensure_pipeline | Ensure the pipeline exists for the object. |
| e_ensure_pipeline_and_add | Ensure the pipeline and add the object. |
Definition at line 25 of file GraphicsSession.h.
|
virtual |
Adds a camera to this session.
| [in] | object | The camera UUID. |
|
pure virtual |
Adds a geometry for rendering.
| [in] | geo | The geometry to add. |
Implemented in GLESGraphicsSession, and VulkanSession.
|
pure virtual |
Creates a new render pipeline for a viewport.
Implemented in GLESGraphicsSession, and VulkanSession.
|
inline |
Checks whether this session is active.
Definition at line 71 of file GraphicsSession.h.
References m_is_active.
|
pure virtual |
Reads and compiles a shader for use in rendering.
| [in] | shader | The shader name or path. |
Implemented in GLESGraphicsSession, and QtVulkanSession.
|
virtual |
Removes a camera from this session.
| [in] | camera | The camera UUID. |
|
pure virtual |
Removes a geometry from rendering.
| [in] | geo | The geometry to remove. |
Implemented in GLESGraphicsSession, and VulkanSession.
|
inline |
Sets whether this session is active.
| [in] | active | Whether to activate the session. |
Definition at line 74 of file GraphicsSession.h.
References m_is_active.
|
pure virtual |
Returns the unique identifier for this session.
Implemented in GLESGraphicsSession, and VulkanSession.