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

#include <VulkanSession.h>

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

Public Member Functions

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

Protected Member Functions

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

Protected Attributes

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

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()

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()

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 files: