summaryrefslogtreecommitdiff
path: root/src/client.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/client.cpp')
-rw-r--r--src/client.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/client.cpp b/src/client.cpp
index c0c513fef..865cf71ee 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -33,6 +33,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "nodemetadata.h"
#include "nodedef.h"
#include "itemdef.h"
+#include "shader.h"
#include <IFileSystem.h>
#include "sha1.h"
#include "base64.h"
@@ -228,12 +229,14 @@ Client::Client(
std::string password,
MapDrawControl &control,
IWritableTextureSource *tsrc,
+ IWritableShaderSource *shsrc,
IWritableItemDefManager *itemdef,
IWritableNodeDefManager *nodedef,
ISoundManager *sound,
MtEventManager *event
):
m_tsrc(tsrc),
+ m_shsrc(shsrc),
m_itemdef(itemdef),
m_nodedef(nodedef),
m_sound(sound),
@@ -2456,6 +2459,9 @@ void Client::afterContentReceived()
if(g_settings->getBool("enable_texture_atlas"))
m_tsrc->buildMainAtlas(this);
+ // Rebuild shaders
+ m_shsrc->rebuildShaders();
+
// Update node aliases
infostream<<"- Updating node aliases"<<std::endl;
m_nodedef->updateAliases(m_itemdef);
@@ -2512,6 +2518,10 @@ ITextureSource* Client::getTextureSource()
{
return m_tsrc;
}
+IShaderSource* Client::getShaderSource()
+{
+ return m_shsrc;
+}
u16 Client::allocateUnknownNodeId(const std::string &name)
{
errorstream<<"Client::allocateUnknownNodeId(): "