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

Logic for creating the data in Vulkan for a specific Material. More...

#include <VulkanMaterialManager.h>

Collaboration diagram for VulkanMaterialManager:
[legend]

Public Member Functions

void addMaterial (const Material &material)
 
void checkImages ()
 
void cleanup ()
 
void clearMaterials ()
 
void commit ()
 
void createPipeline (GraphicsUpdateArguments &args, DynamicPointer< VulkanShaderManager > &shader_manager, DynamicPointer< VulkanImageManager > &image_manager, VkDescriptorPool pool)
 
void createSampler (const GraphicsUpdateArguments &args)
 
fltp04 depthBias () const
 
VkDescriptorSet descriptorSet () const
 
fltp04 fadeDistance () const
 
VulkanBitflagObject getBitflagObject () const
 
String getColorByChannel (GraphicsUpdateArguments &args) const
 
String getExtraPropertyChannel () const
 
ConstPointer< VulkanShadergetFragmentShader (PrimitiveMode property) const
 
FragUniformObject getFragUniformObject (const Material &material) const
 
uint04 getNumberOfImages (const GraphicsUpdateArguments &args) const
 
void getShaderCreateInfo (PrimitiveMode property, Buffer< VkPipelineShaderStageCreateInfo, uint04, ObjectAllocator< true > > &buffer) const
 
VulkanBitflagObject getUVImageFlags (const Material &material) const
 
VulkanVertexUniformObject getVulkanVertexUniformObject (const Material &material, const GraphicsUpdateArguments &args) const
 
bool hasGrid () const
 
bool hasImage () const
 
bool hasOpacity () const
 
UUID id () const
 
bool ignoreDepth () const
 
bool isDynamic () const
 
bool isTwoSided () const
 
bool isWireframe () const
 
Time lastDependencyUpdate () const
 
UUID material () const
 
bool overrideCamera () const
 
void resetPool ()
 
bool smoothNormals () const
 
void updateUniformBuffer (GraphicsUpdateArguments &args)
 
bool useLighting () const
 
bool useNormalForTexture () const
 
bool usesLayerColor () const
 
bool usesModelColor () const
 
VulkanBitflagObject uvImageFlags () const
 
const VulkanVertexUniformObjectvertexUniform () const
 
 VulkanMaterialManager (const ConstPointer< VulkanDevice > &device)
 
 VulkanMaterialManager (const VulkanMaterialManager &m_pipeline)=delete
 
bool writeToDepth () const
 
 ~VulkanMaterialManager ()
 

Static Public Member Functions

static VkDescriptorSetLayout descriptorSetLayout (ConstPointer< VulkanDevice > device)
 
static UUID MaterialID (const Material &material)
 

Protected Member Functions

void createDescriptorSet (VkDescriptorPool pool, const GraphicsUpdateArguments &args)
 
void getDescriptorWrites (Buffer< VkWriteDescriptorSet, uint04, ObjectAllocator< true > > &descriptor_writes, Buffer< VkDescriptorImageInfo, uint04, ObjectAllocator< true > > &image_info) const
 
uint04 getLayerNumber (const Material &material) const
 
bool needsToUpdateImage (const Material &material)
 
bool needsToUpdateShader (const Material &material)
 
void updateImages (const Material &mat, const GraphicsUpdateArguments &args, DynamicPointer< VulkanImageManager > &image_manager)
 
void updateShader (const Material &mat, const GraphicsUpdateArguments &args, DynamicPointer< VulkanShaderManager > &shader_manager)
 

Protected Attributes

fltp04 m_depth_bias
 
VkDescriptorPool m_descriptor_pool
 
VkDescriptorSet m_descriptor_set
 
ConstPointer< VulkanDevicem_device
 
String m_extra_channel
 
FragUniformObject m_frag_uniform
 
DynamicPointer< VulkanBufferm_frag_uniform_buffer
 
bool m_has_grid = false
 
bool m_has_image = false
 
bool m_has_image_opacity = false
 
bool m_has_opacity = false
 
UUID m_id
 
bool m_ignore_depth = false
 
String m_image_address [cast< uint04 >(UVType::e_uv_size)]
 
bool m_is_dynamic = false
 
bool m_is_two_sided = false
 
bool m_is_wireframe = false
 
VulkanBitflagObject m_last_image_flag_object
 
Time m_last_push_update_time
 
Time m_last_updated_time
 
uint04 m_layer_number
 
Buffer< Materialm_materials
 
bool m_needs_pipeline_update = true
 
bool m_needs_to_commit_frag_buffer = true
 
bool m_needs_to_commit_vert_buffer = true
 
uint04 m_number_of_uniforms
 
bool m_override_camera = false
 
VkSampler m_sampler
 
Material::ShadingModel m_shade_model
 
DynamicPointer< VulkanShaderManagerm_shader_manager
 
String m_shader_name
 
bool m_smooth_normals = false
 
Vector< 3, Material::TileTextureModem_texture_tile_mode
 
bool m_use_layer_color = false
 
bool m_use_model_color = false
 
bool m_use_normal_for_texture = false
 
ConstPointer< VulkanImageDatam_uv_data [cast< uint04 >(UVType::e_uv_size)]
 
ConstPointer< VulkanImageViewm_uv_view [cast< uint04 >(UVType::e_uv_size)]
 
VulkanVertexUniformObject m_vert_uniform
 
DynamicPointer< VulkanBufferm_vertex_uniform_buffer
 
bool m_write_to_depth = true
 

Detailed Description

Logic for creating the data in Vulkan for a specific Material.


Constructor & Destructor Documentation

◆ VulkanMaterialManager() [1/2]

◆ VulkanMaterialManager() [2/2]

VulkanMaterialManager ( const VulkanMaterialManager & m_pipeline)
delete

◆ ~VulkanMaterialManager()

Member Function Documentation

◆ addMaterial()

void addMaterial ( const Material & material)

◆ checkImages()

void checkImages ( )

◆ cleanup()

void cleanup ( )

◆ clearMaterials()

void clearMaterials ( )

◆ commit()

void commit ( )

◆ createDescriptorSet()

void createDescriptorSet ( VkDescriptorPool pool,
const GraphicsUpdateArguments & args )
protected

◆ createPipeline()

void createPipeline ( GraphicsUpdateArguments & args,
DynamicPointer< VulkanShaderManager > & shader_manager,
DynamicPointer< VulkanImageManager > & image_manager,
VkDescriptorPool pool )

◆ createSampler()

void createSampler ( const GraphicsUpdateArguments & args)

◆ depthBias()

fltp04 depthBias ( ) const
inline

◆ descriptorSet()

VkDescriptorSet descriptorSet ( ) const
inline

◆ descriptorSetLayout()

static VkDescriptorSetLayout descriptorSetLayout ( ConstPointer< VulkanDevice > device)
static

◆ fadeDistance()

fltp04 fadeDistance ( ) const

◆ getBitflagObject()

VulkanBitflagObject getBitflagObject ( ) const

◆ getColorByChannel()

String getColorByChannel ( GraphicsUpdateArguments & args) const

◆ getDescriptorWrites()

void getDescriptorWrites ( Buffer< VkWriteDescriptorSet, uint04, ObjectAllocator< true > > & descriptor_writes,
Buffer< VkDescriptorImageInfo, uint04, ObjectAllocator< true > > & image_info ) const
protected

◆ getExtraPropertyChannel()

String getExtraPropertyChannel ( ) const
inline

◆ getFragmentShader()

ConstPointer< VulkanShader > getFragmentShader ( PrimitiveMode property) const

◆ getFragUniformObject()

FragUniformObject getFragUniformObject ( const Material & material) const

◆ getLayerNumber()

uint04 getLayerNumber ( const Material & material) const
protected

◆ getNumberOfImages()

uint04 getNumberOfImages ( const GraphicsUpdateArguments & args) const

◆ getShaderCreateInfo()

void getShaderCreateInfo ( PrimitiveMode property,
Buffer< VkPipelineShaderStageCreateInfo, uint04, ObjectAllocator< true > > & buffer ) const

◆ getUVImageFlags()

VulkanBitflagObject getUVImageFlags ( const Material & material) const

◆ getVulkanVertexUniformObject()

VulkanVertexUniformObject getVulkanVertexUniformObject ( const Material & material,
const GraphicsUpdateArguments & args ) const

◆ hasGrid()

bool hasGrid ( ) const
inline

◆ hasImage()

bool hasImage ( ) const

◆ hasOpacity()

bool hasOpacity ( ) const
inline

◆ id()

UUID id ( ) const

◆ ignoreDepth()

bool ignoreDepth ( ) const
inline

◆ isDynamic()

bool isDynamic ( ) const
inline

◆ isTwoSided()

bool isTwoSided ( ) const
inline

◆ isWireframe()

bool isWireframe ( ) const
inline

◆ lastDependencyUpdate()

Time lastDependencyUpdate ( ) const
inline

◆ material()

UUID material ( ) const

◆ MaterialID()

static UUID MaterialID ( const Material & material)
static

◆ needsToUpdateImage()

bool needsToUpdateImage ( const Material & material)
protected

◆ needsToUpdateShader()

bool needsToUpdateShader ( const Material & material)
protected

◆ overrideCamera()

bool overrideCamera ( ) const
inline

◆ resetPool()

void resetPool ( )
inline

◆ smoothNormals()

bool smoothNormals ( ) const

◆ updateImages()

void updateImages ( const Material & mat,
const GraphicsUpdateArguments & args,
DynamicPointer< VulkanImageManager > & image_manager )
protected

◆ updateShader()

void updateShader ( const Material & mat,
const GraphicsUpdateArguments & args,
DynamicPointer< VulkanShaderManager > & shader_manager )
protected

◆ updateUniformBuffer()

void updateUniformBuffer ( GraphicsUpdateArguments & args)

◆ useLighting()

bool useLighting ( ) const

◆ useNormalForTexture()

bool useNormalForTexture ( ) const
inline

◆ usesLayerColor()

bool usesLayerColor ( ) const
inline

◆ usesModelColor()

bool usesModelColor ( ) const
inline

◆ uvImageFlags()

VulkanBitflagObject uvImageFlags ( ) const
inline

◆ vertexUniform()

const VulkanVertexUniformObject & vertexUniform ( ) const
inline

◆ writeToDepth()

bool writeToDepth ( ) const
inline

Member Data Documentation

◆ m_depth_bias

fltp04 m_depth_bias
protected

◆ m_descriptor_pool

VkDescriptorPool m_descriptor_pool
protected

◆ m_descriptor_set

VkDescriptorSet m_descriptor_set
protected

◆ m_device

ConstPointer<VulkanDevice> m_device
protected

◆ m_extra_channel

String m_extra_channel
protected

◆ m_frag_uniform

FragUniformObject m_frag_uniform
protected

◆ m_frag_uniform_buffer

DynamicPointer<VulkanBuffer> m_frag_uniform_buffer
protected

◆ m_has_grid

bool m_has_grid = false
protected

◆ m_has_image

bool m_has_image = false
protected

◆ m_has_image_opacity

bool m_has_image_opacity = false
protected

◆ m_has_opacity

bool m_has_opacity = false
protected

◆ m_id

UUID m_id
protected

◆ m_ignore_depth

bool m_ignore_depth = false
protected

◆ m_image_address

String m_image_address[cast< uint04 >(UVType::e_uv_size)]
protected

◆ m_is_dynamic

bool m_is_dynamic = false
protected

◆ m_is_two_sided

bool m_is_two_sided = false
protected

◆ m_is_wireframe

bool m_is_wireframe = false
protected

◆ m_last_image_flag_object

VulkanBitflagObject m_last_image_flag_object
protected

◆ m_last_push_update_time

Time m_last_push_update_time
protected

◆ m_last_updated_time

Time m_last_updated_time
protected

◆ m_layer_number

uint04 m_layer_number
protected

◆ m_materials

Buffer<Material> m_materials
protected

◆ m_needs_pipeline_update

bool m_needs_pipeline_update = true
protected

◆ m_needs_to_commit_frag_buffer

bool m_needs_to_commit_frag_buffer = true
mutableprotected

◆ m_needs_to_commit_vert_buffer

bool m_needs_to_commit_vert_buffer = true
mutableprotected

◆ m_number_of_uniforms

uint04 m_number_of_uniforms
protected

◆ m_override_camera

bool m_override_camera = false
protected

◆ m_sampler

VkSampler m_sampler
protected

◆ m_shade_model

Material::ShadingModel m_shade_model
protected

◆ m_shader_manager

DynamicPointer<VulkanShaderManager> m_shader_manager
protected

◆ m_shader_name

String m_shader_name
protected

◆ m_smooth_normals

bool m_smooth_normals = false
protected

◆ m_texture_tile_mode

Vector<3, Material::TileTextureMode> m_texture_tile_mode
protected

◆ m_use_layer_color

bool m_use_layer_color = false
protected

◆ m_use_model_color

bool m_use_model_color = false
protected

◆ m_use_normal_for_texture

bool m_use_normal_for_texture = false
protected

◆ m_uv_data

◆ m_uv_view

◆ m_vert_uniform

VulkanVertexUniformObject m_vert_uniform
protected

◆ m_vertex_uniform_buffer

DynamicPointer<VulkanBuffer> m_vertex_uniform_buffer
protected

◆ m_write_to_depth

bool m_write_to_depth = true
protected

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