Skip to content

Commit

Permalink
Don't rebuild the dummy shader (less SourceShaderCache warning spam)
Browse files Browse the repository at this point in the history
Also write something about rebuilding shaders to infostream in
Client::afterContentReceived()
  • Loading branch information
kahrl committed Jul 5, 2013
1 parent 92833a0 commit 922a30e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/client.cpp
Expand Up @@ -2850,6 +2850,7 @@ void Client::afterContentReceived(IrrlichtDevice *device, gui::IGUIFont* font)
m_tsrc->rebuildImagesAndTextures();

// Rebuild shaders
infostream<<"- Rebuilding shaders"<<std::endl;
m_shsrc->rebuildShaders();

// Update node aliases
Expand Down
6 changes: 4 additions & 2 deletions src/shader.cpp
Expand Up @@ -585,8 +585,10 @@ void ShaderSource::rebuildShaders()
// Recreate shaders
for(u32 i=0; i<m_shaderinfo_cache.size(); i++){
ShaderInfo *info = &m_shaderinfo_cache[i];
*info = generate_shader(info->name, m_device,
m_shader_callback, &m_sourcecache);
if(info->name != ""){
*info = generate_shader(info->name, m_device,
m_shader_callback, &m_sourcecache);
}
}
}

Expand Down

0 comments on commit 922a30e

Please sign in to comment.