From 22e6fb7056dcc888e9ccf768fefb6c073077a3b5 Mon Sep 17 00:00:00 2001 From: Kahrl Date: Mon, 19 Mar 2012 02:59:12 +0100 Subject: ShaderSource and silly example shaders --- src/client.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/client.cpp') 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 #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"<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(): " -- cgit v1.2.3