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

#include <VulkanMaterialManager.h>

Collaboration diagram for VulkanMaterialManager:
[legend]

Public Member Functions

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

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
 
void updateShader (const Material &mat, const GraphicsUpdateArguments &args, DynamicPointer< VulkanShaderManager > &shader_manager)
 
void updateImages (const Material &mat, const GraphicsUpdateArguments &args, DynamicPointer< VulkanImageManager > &image_manager)
 
bool needsToUpdateImage (const Material &material)
 
bool needsToUpdateShader (const Material &material)
 
uint04 getLayerNumber (const Material &material) const
 

Protected Attributes

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

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

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

◆ getVertexUniformObject()

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

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 VertexUniformObject & 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

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