Nameless Engine
Loading...
Searching...
No Matches
ne::GlslShaderCacheManager Class Reference

#include <GlslShaderCacheManager.h>

Inheritance diagram for ne::GlslShaderCacheManager:
ne::ShaderCacheManager

Public Member Functions

 GlslShaderCacheManager (const GlslShaderCacheManager &)=delete
 
GlslShaderCacheManageroperator= (const GlslShaderCacheManager &)=delete
 
- Public Member Functions inherited from ne::ShaderCacheManager
 ShaderCacheManager (const ShaderCacheManager &)=delete
 
ShaderCacheManageroperator= (const ShaderCacheManager &)=delete
 
std::optional< ErrorrefreshShaderCache ()
 

Protected Member Functions

virtual std::optional< std::string > isLanguageSpecificGlobalCacheOutdated (const ConfigManager &cacheConfig) override
 
virtual std::optional< ErrorwriteLanguageSpecificParameters (ConfigManager &cacheConfig) override
 
- Protected Member Functions inherited from ne::ShaderCacheManager
 ShaderCacheManager (Renderer *pRenderer)
 
virtual std::optional< std::string > isLanguageSpecificGlobalCacheOutdated (const ConfigManager &cacheConfig)=0
 
virtual std::optional< ErrorwriteLanguageSpecificParameters (ConfigManager &cacheConfig)=0
 

Private Member Functions

 GlslShaderCacheManager (Renderer *pRenderer)
 

Friends

class ShaderCacheManager
 

Detailed Description

Responsible for validating GLSL shader cache, reading and updating the cache.

Constructor & Destructor Documentation

◆ GlslShaderCacheManager()

ne::GlslShaderCacheManager::GlslShaderCacheManager ( Renderer pRenderer)
private

Constructs a new manager.

Parameters
pRendererUsed renderer.

Member Function Documentation

◆ isLanguageSpecificGlobalCacheOutdated()

std::optional< std::string > ne::GlslShaderCacheManager::isLanguageSpecificGlobalCacheOutdated ( const ConfigManager cacheConfig)
overrideprotectedvirtual

Makes sure that the cache was generated using the same parameters as the current renderer's state and that the cache can be safely used. This function checks shader language specific parameters that might have changed.

Parameters
cacheConfigConfig that stores global cache parameters.
Returns
Empty if cache can be safely used, otherwise reason why it's outdated and cache can't be used.

Implements ne::ShaderCacheManager.

◆ writeLanguageSpecificParameters()

std::optional< Error > ne::GlslShaderCacheManager::writeLanguageSpecificParameters ( ConfigManager cacheConfig)
overrideprotectedvirtual

Writes shader language specific parameters that affect shader cache into the specified config.

Parameters
cacheConfigConfig that stores global cache parameters.
Returns
Error if something went wrong.

Implements ne::ShaderCacheManager.


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