MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ destroy_shader()

void MayaFlux::Portal::Graphics::ShaderFoundry::destroy_shader ( ShaderID  shader_id)

Destroy shader (cleanup internal state)

Definition at line 440 of file ShaderFoundry.cpp.

441{
442 auto it = m_shaders.find(shader_id);
443 if (it != m_shaders.end()) {
444 if (!it->second.filepath.empty()) {
445 m_shader_filepath_cache.erase(it->second.filepath);
446 m_shader_cache.erase(it->second.filepath);
447 }
448 if (it->second.module) {
449 it->second.module->cleanup(get_device());
450 }
451 m_shaders.erase(it);
452 }
453}
vk::Device get_device() const
Get logical device handle.
std::unordered_map< std::string, ShaderID > m_shader_filepath_cache
std::unordered_map< std::string, std::shared_ptr< Core::VKShaderModule > > m_shader_cache
std::unordered_map< ShaderID, ShaderState > m_shaders

References get_device(), m_shader_cache, m_shader_filepath_cache, and m_shaders.

Referenced by reload_shader().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: