Don't rebuild the dummy shader (less SourceShaderCache warning spam)
Also write something about rebuilding shaders to infostream in Client::afterContentReceived()master
parent
92833a07d1
commit
922a30ee47
|
@ -2850,6 +2850,7 @@ void Client::afterContentReceived(IrrlichtDevice *device, gui::IGUIFont* font)
|
||||||
m_tsrc->rebuildImagesAndTextures();
|
m_tsrc->rebuildImagesAndTextures();
|
||||||
|
|
||||||
// Rebuild shaders
|
// Rebuild shaders
|
||||||
|
infostream<<"- Rebuilding shaders"<<std::endl;
|
||||||
m_shsrc->rebuildShaders();
|
m_shsrc->rebuildShaders();
|
||||||
|
|
||||||
// Update node aliases
|
// Update node aliases
|
||||||
|
|
|
@ -585,10 +585,12 @@ void ShaderSource::rebuildShaders()
|
||||||
// Recreate shaders
|
// Recreate shaders
|
||||||
for(u32 i=0; i<m_shaderinfo_cache.size(); i++){
|
for(u32 i=0; i<m_shaderinfo_cache.size(); i++){
|
||||||
ShaderInfo *info = &m_shaderinfo_cache[i];
|
ShaderInfo *info = &m_shaderinfo_cache[i];
|
||||||
|
if(info->name != ""){
|
||||||
*info = generate_shader(info->name, m_device,
|
*info = generate_shader(info->name, m_device,
|
||||||
m_shader_callback, &m_sourcecache);
|
m_shader_callback, &m_sourcecache);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void ShaderSource::onSetConstants(video::IMaterialRendererServices *services,
|
void ShaderSource::onSetConstants(video::IMaterialRendererServices *services,
|
||||||
bool is_highlevel, const std::string &name)
|
bool is_highlevel, const std::string &name)
|
||||||
|
|
Loading…
Reference in New Issue