![]() |
NDEVR
API Documentation
|
A VulkanSession within the Qt space. More...
Public Member Functions | |
| QtVulkanSession (const DynamicPointer< VulkanDevice > &device) | |
| Constructs a QtVulkanSession with the given device. | |
| virtual void | readShader (const StringView &shader) override |
| Reads and compiles a shader from resources. | |
| Public Member Functions inherited from VulkanSession | |
| virtual void | cleanResources () final override |
| Cleans up stale or unused GPU resources. | |
| void | commit (GraphicsUpdateArguments &args) final override |
| Commits pending changes to the GPU. | |
| bool | createPipeline (GraphicsUpdateArguments &args) final override |
| Creates or recreates the rendering pipeline. | |
| DynamicPointer< GraphicsPipeline > | createRenderPipeline () final override |
| Creates a new render pipeline for a viewport. | |
| virtual const ConstPointer< GraphicsDevice > & | device () const final override |
| Returns the graphics device (const). | |
| virtual const DynamicPointer< GraphicsDevice > & | device () final override |
| Returns the graphics device. | |
| virtual void | drawFrame (GraphicsUpdateArguments &) final override |
| Renders a single frame. | |
| virtual void | ensureLastRenderComplete () final override |
| Blocks until the last submitted render is complete. | |
| bool | hasCommand () const override |
| Checks whether there are pending commands to execute. | |
| virtual void | init (GraphicsUpdateArguments &) final override |
| Initializes the pipeline with the given arguments. | |
| virtual void | postClearAll () final override |
| Called after all scene objects have been cleared. | |
| bool | runCommand (GraphicsUpdateArguments &args) final override |
| Executes a queued rendering command. | |
| virtual void | setWindowInstance (WindowInstance *) final override |
| Associates a window instance with this pipeline. | |
| void | updateUniformBuffer (GraphicsUpdateArguments &args) final override |
| Updates the camera uniform buffer on the GPU. | |
| virtual UUID | uuid () final override |
| Returns the unique identifier for this session. | |
| Public Member Functions inherited from GraphicsSession | |
| virtual | ~GraphicsSession () |
| Destructor. | |
| virtual void | addCamera (const UUID &object) |
| Adds a camera to this session. | |
| bool | isActive () const |
| Checks whether this session is active. | |
| virtual void | removeCamera (const UUID &camera) |
| Removes a camera from this session. | |
| void | setActive (bool active) |
| Sets whether this session is active. | |
| Public Member Functions inherited from GraphicsPipeline | |
| virtual | ~GraphicsPipeline () |
| Destructor. | |
Static Public Member Functions | |
| static const DynamicPointer< GraphicsSession > & | DefaultSession () |
| Returns the default shared graphics session, creating it if needed. | |
Additional Inherited Members | |
| Public Types inherited from GraphicsSession | |
| enum | AddObjectMode { e_add_object , e_ensure_pipeline , e_ensure_pipeline_and_add } |
| Modes for adding objects to the session. More... | |
| Protected Types inherited from VulkanSession | |
| enum | RasterizerType { e_filled_cull_cw , e_filled_cull_ccw , e_filled_cull_none , e_outline , e_size } |
| Types of rasterizer configurations used during rendering. More... | |
| Protected Member Functions inherited from VulkanSession | |
| bool | addRenderGeometry (const Geometry &geo) override |
| Adds a geometry for rendering. | |
| void | cleanup () final override |
| Releases all GPU resources. | |
| void | removeRenderGeometry (const Geometry &geo) override |
| Removes a geometry from rendering. | |
| Protected Attributes inherited from GraphicsSession | |
| 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. | |
|
inline |
Constructs a QtVulkanSession with the given device.
| [in] | device | The Vulkan device to use for rendering. |
Definition at line 22 of file QtVulkanSession.h.
References VulkanSession::device().
Referenced by DefaultSession().
|
inlinestatic |
Returns the default shared graphics session, creating it if needed.
Definition at line 27 of file QtVulkanSession.h.
References QtVulkanSession(), ViewportOptions::default_render_engine, and VulkanDevice::DefaultVulkanDevice().
|
inlineoverridevirtual |
Reads and compiles a shader from resources.
| [in] | shader | The name of the shader to load. |
Implements GraphicsSession.
Definition at line 46 of file QtVulkanSession.h.
References cast(), VulkanShaderManager::e_shader_type_size, file, VulkanShaderManager::formats, StringView::getAs(), and ResourceResolver::ResolveResource().