Public Member Functions | |
ShaderSource () | |
~ShaderSource () override | |
u32 | getShaderIdDirect (const std::string &name, MaterialType material_type, NodeDrawType drawtype) override |
u32 | getShader (const std::string &name, MaterialType material_type, NodeDrawType drawtype) override |
ShaderInfo | getShaderInfo (u32 id) override |
void | processQueue () override |
void | insertSourceShader (const std::string &name_of_shader, const std::string &filename, const std::string &program) override |
void | rebuildShaders () override |
void | addShaderConstantSetterFactory (IShaderConstantSetterFactory *setter) override |
Public Member Functions inherited from IWritableShaderSource | |
IWritableShaderSource ()=default | |
virtual | ~IWritableShaderSource ()=default |
Public Member Functions inherited from IShaderSource | |
IShaderSource ()=default | |
virtual | ~IShaderSource ()=default |
Private Member Functions | |
ShaderInfo | generateShader (const std::string &name, MaterialType material_type, NodeDrawType drawtype) |
Private Attributes | |
bool | m_enabled |
std::thread::id | m_main_thread |
SourceShaderCache | m_sourcecache |
std::vector< ShaderInfo > | m_shaderinfo_cache |
std::mutex | m_shaderinfo_cache_mutex |
std::vector< std::unique_ptr< IShaderConstantSetterFactory > > | m_setter_factories |
ShaderSource::ShaderSource | ( | ) |
References addShaderConstantSetterFactory(), g_settings, Settings::getBool(), m_enabled, m_main_thread, m_shaderinfo_cache, and warningstream.
|
override |
References RenderingEngine::get_video_driver(), m_enabled, m_shaderinfo_cache, and m_shaderinfo_cache_mutex.
|
inlineoverridevirtual |
setter
. Implements IWritableShaderSource.
References m_setter_factories.
Referenced by ShaderSource().
|
private |
References ShaderInfo::base_material, ShaderInfo::drawtype, dumpShaderProgram(), errorstream, fmtgettext(), g_settings, Settings::get(), RenderingEngine::get_video_driver(), Settings::getBool(), Settings::getFloat(), SourceShaderCache::getOrLoad(), Settings::getS32(), Settings::getU16(), infostream, m_enabled, m_setter_factories, m_sourcecache, ShaderInfo::material, ShaderInfo::material_type, MYMAX, ShaderInfo::name, NDT_AIRLIKE, NDT_ALLFACES, NDT_ALLFACES_OPTIONAL, NDT_FENCELIKE, NDT_FIRELIKE, NDT_FLOWINGLIQUID, NDT_GLASSLIKE, NDT_GLASSLIKE_FRAMED, NDT_GLASSLIKE_FRAMED_OPTIONAL, NDT_LIQUID, NDT_NODEBOX, NDT_NORMAL, NDT_PLANTLIKE, NDT_PLANTLIKE_ROOTED, NDT_RAILLIKE, NDT_SIGNLIKE, NDT_TORCHLIKE, PROVIDE, strgettext(), TILE_MATERIAL_ALPHA, TILE_MATERIAL_BASIC, TILE_MATERIAL_LIQUID_OPAQUE, TILE_MATERIAL_LIQUID_TRANSPARENT, TILE_MATERIAL_OPAQUE, TILE_MATERIAL_PLAIN, TILE_MATERIAL_PLAIN_ALPHA, TILE_MATERIAL_WAVING_LEAVES, TILE_MATERIAL_WAVING_LIQUID_BASIC, TILE_MATERIAL_WAVING_LIQUID_OPAQUE, TILE_MATERIAL_WAVING_LIQUID_TRANSPARENT, TILE_MATERIAL_WAVING_PLANTS, and warningstream.
Referenced by getShaderIdDirect(), and rebuildShaders().
|
overridevirtual |
Reimplemented from IShaderSource.
References errorstream, getShaderIdDirect(), infostream, GetResult< Key, T, Caller, CallerData >::item, GetResult< Key, T, Caller, CallerData >::key, m_main_thread, and MutexedQueue< T >::pop_frontNoEx().
|
overridevirtual |
Reimplemented from IShaderSource.
References ShaderInfo::drawtype, errorstream, generateShader(), infostream, m_main_thread, m_shaderinfo_cache, m_shaderinfo_cache_mutex, ShaderInfo::material_type, and ShaderInfo::name.
Referenced by getShader().
|
overridevirtual |
Reimplemented from IShaderSource.
References m_shaderinfo_cache, and m_shaderinfo_cache_mutex.
|
overridevirtual |
Implements IWritableShaderSource.
References SourceShaderCache::insert(), m_main_thread, m_sourcecache, and sanity_check.
|
overridevirtual |
Implements IWritableShaderSource.
|
overridevirtual |
Implements IWritableShaderSource.
References ShaderInfo::drawtype, generateShader(), RenderingEngine::get_video_driver(), m_enabled, m_shaderinfo_cache, m_shaderinfo_cache_mutex, ShaderInfo::material_type, and ShaderInfo::name.
|
private |
Referenced by ShaderSource(), ~ShaderSource(), generateShader(), and rebuildShaders().
|
private |
Referenced by ShaderSource(), getShader(), getShaderIdDirect(), and insertSourceShader().
|
private |
Referenced by addShaderConstantSetterFactory(), and generateShader().
|
private |
Referenced by ShaderSource(), ~ShaderSource(), getShaderIdDirect(), getShaderInfo(), and rebuildShaders().
|
private |
Referenced by ~ShaderSource(), getShaderIdDirect(), getShaderInfo(), and rebuildShaders().
|
private |
Referenced by generateShader(), and insertSourceShader().