API Documentation
Loading...
Searching...
No Matches
VulkanSession Class Reference

Creates and manages the resources necessary for converting a DesignObjectLookup into 3D rendered data in the Vulkan engine. More...

#include <VulkanSession.h>

Inheritance diagram for VulkanSession:
[legend]
Collaboration diagram for VulkanSession:
[legend]

Public Member Functions

virtual void cleanResources () final override
 
void cleanupOldPipelines (GraphicsUpdateArguments &args)
 
void commit (GraphicsUpdateArguments &args) final override
 
bool createPipeline (GraphicsUpdateArguments &args) final override
 
DynamicPointer< GraphicsPipelinecreateRenderPipeline () final override
 
void destroyCameraManager (const UUID &camera)
 
void destroyMaterialManager (const UUID &mat)
 
void destroySceneManager (const UUID &scene)
 
void destroyVertexManager (const UUID &mesh)
 
virtual const ConstPointer< GraphicsDevice > & device () const final override
 
virtual const DynamicPointer< GraphicsDevice > & device () final override
 
virtual void drawFrame (GraphicsUpdateArguments &) final override
 
void ensureCameraExists (const UUID &camera)
 
void ensureExists (const Geometry &mesh)
 
virtual void ensureLastRenderComplete () final override
 
DynamicPointer< VulkanCameraManagergetCameraManager (const UUID &camera)
 
DynamicPointer< VulkanMaterialManagergetMaterialManager (const Material &mat)
 
DynamicPointer< VulkanMaterialManagergetMaterialManager (const UUID &id)
 
DynamicPointer< VulkanVertexManagergetVertexManager (const Geometry &mesh)
 
bool hasCommand () const override
 
virtual void init (GraphicsUpdateArguments &) final override
 
virtual void postClearAll () final override
 
void removeGeometry (const UUID &mesh) final override
 
void removeMaterial (const UUID &material) final override
 
bool runCommand (GraphicsUpdateArguments &args) final override
 
void setRenderDefinition (const DynamicPointer< VulkanRenderDefinition > &def)
 
virtual void setWindowInstance (WindowInstance *) final override
 
DynamicPointer< VulkanShaderManagershaderManager ()
 
void updateUniformBuffer (GraphicsUpdateArguments &args) final override
 
UUID uuid () const
 
virtual UUID uuid () final override
 
 VulkanSession (const DynamicPointer< VulkanDevice > &instance)
 
 ~VulkanSession ()
 
- Public Member Functions inherited from GraphicsSession
virtual void addCamera (const UUID &object)
 
virtual void addGeometry (const UUID &geo)
 
virtual void addMaterial (const UUID &material)
 
virtual void addModel (const UUID &object)
 
virtual void addRenderObject (GraphicsUpdateArguments &args, Model &model)
 
virtual void addScene (const UUID &scene)
 
virtual void readShader (const String &shader)=0
 
virtual void removeCamera (const UUID &camera)
 
virtual void removeModel (const UUID &model)
 
virtual ~GraphicsSession ()
 
- Public Member Functions inherited from GraphicsPipeline
virtual ~GraphicsPipeline ()
 

Protected Member Functions

void addRenderObject (const Scene &scene, const Model &model, const Material &mat, const Geometry &mesh, PrimitiveProperty property) override
 
bool checkAddRenderObject (const Scene &scene, const Model &model, const Material &mat, const Geometry &mesh, PrimitiveProperty property)
 
bool checkAddRenderObject (GraphicsUpdateArguments &args, Model &model)
 
bool checkScene (GraphicsUpdateArguments &args)
 
void cleanup () final override
 
virtual void clearAll ()
 
void clearScene ()
 
bool createDescriptorPool (GraphicsUpdateArguments &args)
 
void createModelPipeline (GraphicsUpdateArguments &args)
 
void pipelineSort (GraphicsUpdateArguments &args)
 
void setupScene (GraphicsUpdateArguments &args) override
 

Protected Attributes

Dictionary< UUID, DynamicPointer< VulkanCameraManager > > m_camera_managers
 
VkDescriptorPool m_descriptor_pool
 
DynamicPointer< VulkanDevicem_device
 
DynamicPointer< GraphicsDevicem_graphics_device
 
DynamicPointer< VulkanImageManagerm_image_manager
 
Dictionary< UUID, DynamicPointer< VulkanMaterialManager > > m_material_managers
 
VkPipelineCache m_model_pipeline_cache
 
uint04 m_num_of_cameras
 
uint04 m_num_of_images
 
uint04 m_num_of_materials
 
Buffer< VulkanRenderObject * > m_pipelines
 
DynamicPointer< VulkanRenderDefinitionm_render_definition
 
Dictionary< UUID, Dictionary< UUID, Dictionary< PrimitiveMode, VulkanRenderObject * > > > m_render_objects [2]
 
Dictionary< UUID, DynamicPointer< VulkanVertexManager > > m_scene_managers
 
DynamicPointer< VulkanShaderManagerm_shader_manager
 
bool m_update_model_pool
 
UUID m_uuid
 
Dictionary< UUID, DynamicPointer< VulkanVertexManager > > m_vertex_managers
 
- Protected Attributes inherited from GraphicsSession
Buffer< UUIDm_added_cameras
 
Dictionary< UUID, uint04m_added_models
 
bool m_needs_clear_all = false
 
bool m_needs_command_refresh = false
 
bool m_needs_model_refresh = true
 

Detailed Description

Creates and manages the resources necessary for converting a DesignObjectLookup into 3D rendered data in the Vulkan engine.


Constructor & Destructor Documentation

◆ VulkanSession()

VulkanSession ( const DynamicPointer< VulkanDevice > & instance)

◆ ~VulkanSession()

Member Function Documentation

◆ addRenderObject()

void addRenderObject ( const Scene & scene,
const Model & model,
const Material & mat,
const Geometry & mesh,
PrimitiveProperty property )
overrideprotectedvirtual

Implements GraphicsSession.

◆ checkAddRenderObject() [1/2]

bool checkAddRenderObject ( const Scene & scene,
const Model & model,
const Material & mat,
const Geometry & mesh,
PrimitiveProperty property )
protected

◆ checkAddRenderObject() [2/2]

bool checkAddRenderObject ( GraphicsUpdateArguments & args,
Model & model )
protected

◆ checkScene()

bool checkScene ( GraphicsUpdateArguments & args)
protected

◆ cleanResources()

virtual void cleanResources ( )
inlinefinaloverridevirtual

Implements GraphicsPipeline.

◆ cleanup()

void cleanup ( )
finaloverrideprotectedvirtual

Implements GraphicsPipeline.

◆ cleanupOldPipelines()

void cleanupOldPipelines ( GraphicsUpdateArguments & args)

◆ clearAll()

virtual void clearAll ( )
protectedvirtual

◆ clearScene()

void clearScene ( )
protected

◆ commit()

void commit ( GraphicsUpdateArguments & args)
finaloverridevirtual

Implements GraphicsPipeline.

◆ createDescriptorPool()

bool createDescriptorPool ( GraphicsUpdateArguments & args)
protected

◆ createModelPipeline()

void createModelPipeline ( GraphicsUpdateArguments & args)
protected

◆ createPipeline()

bool createPipeline ( GraphicsUpdateArguments & args)
finaloverridevirtual

Implements GraphicsPipeline.

◆ createRenderPipeline()

DynamicPointer< GraphicsPipeline > createRenderPipeline ( )
finaloverridevirtual

Implements GraphicsSession.

◆ destroyCameraManager()

void destroyCameraManager ( const UUID & camera)

◆ destroyMaterialManager()

void destroyMaterialManager ( const UUID & mat)

◆ destroySceneManager()

void destroySceneManager ( const UUID & scene)

◆ destroyVertexManager()

void destroyVertexManager ( const UUID & mesh)

◆ device() [1/2]

virtual const ConstPointer< GraphicsDevice > & device ( ) const
inlinefinaloverridevirtual

Implements GraphicsPipeline.

◆ device() [2/2]

virtual const DynamicPointer< GraphicsDevice > & device ( )
inlinefinaloverridevirtual

Implements GraphicsPipeline.

◆ drawFrame()

virtual void drawFrame ( GraphicsUpdateArguments & )
inlinefinaloverridevirtual

Implements GraphicsPipeline.

◆ ensureCameraExists()

void ensureCameraExists ( const UUID & camera)

◆ ensureExists()

void ensureExists ( const Geometry & mesh)

◆ ensureLastRenderComplete()

virtual void ensureLastRenderComplete ( )
inlinefinaloverridevirtual

Implements GraphicsPipeline.

◆ getCameraManager()

DynamicPointer< VulkanCameraManager > getCameraManager ( const UUID & camera)

◆ getMaterialManager() [1/2]

DynamicPointer< VulkanMaterialManager > getMaterialManager ( const Material & mat)

◆ getMaterialManager() [2/2]

DynamicPointer< VulkanMaterialManager > getMaterialManager ( const UUID & id)

◆ getVertexManager()

DynamicPointer< VulkanVertexManager > getVertexManager ( const Geometry & mesh)

◆ hasCommand()

bool hasCommand ( ) const
overridevirtual

Implements GraphicsPipeline.

◆ init()

virtual void init ( GraphicsUpdateArguments & )
inlinefinaloverridevirtual

Implements GraphicsPipeline.

◆ pipelineSort()

void pipelineSort ( GraphicsUpdateArguments & args)
protected

◆ postClearAll()

virtual void postClearAll ( )
finaloverridevirtual

Reimplemented from GraphicsSession.

◆ removeGeometry()

void removeGeometry ( const UUID & mesh)
finaloverridevirtual

Reimplemented from GraphicsSession.

◆ removeMaterial()

void removeMaterial ( const UUID & material)
finaloverridevirtual

Reimplemented from GraphicsSession.

◆ runCommand()

bool runCommand ( GraphicsUpdateArguments & args)
finaloverridevirtual

Implements GraphicsPipeline.

◆ setRenderDefinition()

void setRenderDefinition ( const DynamicPointer< VulkanRenderDefinition > & def)

◆ setupScene()

void setupScene ( GraphicsUpdateArguments & args)
overrideprotectedvirtual

Reimplemented from GraphicsSession.

◆ setWindowInstance()

virtual void setWindowInstance ( WindowInstance * )
inlinefinaloverridevirtual

Implements GraphicsPipeline.

◆ shaderManager()

DynamicPointer< VulkanShaderManager > shaderManager ( )
inline

◆ updateUniformBuffer()

void updateUniformBuffer ( GraphicsUpdateArguments & args)
finaloverridevirtual

Implements GraphicsPipeline.

◆ uuid() [1/2]

UUID uuid ( ) const
inline

◆ uuid() [2/2]

virtual UUID uuid ( )
inlinefinaloverridevirtual

Implements GraphicsSession.

Member Data Documentation

◆ m_camera_managers

Dictionary<UUID, DynamicPointer<VulkanCameraManager> > m_camera_managers
protected

◆ m_descriptor_pool

VkDescriptorPool m_descriptor_pool
protected

◆ m_device

DynamicPointer<VulkanDevice> m_device
protected

◆ m_graphics_device

DynamicPointer<GraphicsDevice> m_graphics_device
protected

◆ m_image_manager

DynamicPointer<VulkanImageManager> m_image_manager
protected

◆ m_material_managers

Dictionary<UUID, DynamicPointer<VulkanMaterialManager> > m_material_managers
protected

◆ m_model_pipeline_cache

VkPipelineCache m_model_pipeline_cache
protected

◆ m_num_of_cameras

uint04 m_num_of_cameras
protected

◆ m_num_of_images

uint04 m_num_of_images
protected

◆ m_num_of_materials

uint04 m_num_of_materials
protected

◆ m_pipelines

Buffer<VulkanRenderObject*> m_pipelines
protected

◆ m_render_definition

DynamicPointer<VulkanRenderDefinition> m_render_definition
protected

◆ m_render_objects

Dictionary<UUID, Dictionary<UUID, Dictionary<PrimitiveMode, VulkanRenderObject*> > > m_render_objects[2]
protected

◆ m_scene_managers

Dictionary<UUID, DynamicPointer<VulkanVertexManager> > m_scene_managers
protected

◆ m_shader_manager

DynamicPointer<VulkanShaderManager> m_shader_manager
protected

◆ m_update_model_pool

bool m_update_model_pool
protected

◆ m_uuid

UUID m_uuid
protected

◆ m_vertex_managers

Dictionary<UUID, DynamicPointer<VulkanVertexManager> > m_vertex_managers
protected

The documentation for this class was generated from the following file: