diff options
author | Kahrl <kahrl@gmx.net> | 2013-07-05 04:24:05 +0200 |
---|---|---|
committer | Kahrl <kahrl@gmx.net> | 2013-07-05 04:24:05 +0200 |
commit | 922a30ee47edbd6255cd6cbea0f89f21c607094c (patch) | |
tree | bf733358c53b061a8068ef3d08a58b1d31ebc68b | |
parent | 92833a07d111c55f61b23f66fd8aaa95f3239c33 (diff) | |
download | minetest-922a30ee47edbd6255cd6cbea0f89f21c607094c.tar.gz minetest-922a30ee47edbd6255cd6cbea0f89f21c607094c.tar.bz2 minetest-922a30ee47edbd6255cd6cbea0f89f21c607094c.zip |
Don't rebuild the dummy shader (less SourceShaderCache warning spam)
Also write something about rebuilding shaders to infostream in
Client::afterContentReceived()
-rw-r--r-- | src/client.cpp | 1 | ||||
-rw-r--r-- | src/shader.cpp | 6 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/client.cpp b/src/client.cpp index 5e682aaa3..ccd2034fc 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -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 diff --git a/src/shader.cpp b/src/shader.cpp index 9cef7f353..58042e651 100644 --- a/src/shader.cpp +++ b/src/shader.cpp @@ -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); + } } } |