summaryrefslogtreecommitdiff
path: root/src/client.cpp
diff options
context:
space:
mode:
authorKahrl <kahrl@gmx.net>2012-03-19 02:59:12 +0100
committerPerttu Ahola <celeron55@gmail.com>2012-12-02 00:46:18 +0200
commit22e6fb7056dcc888e9ccf768fefb6c073077a3b5 (patch)
treef85461ee0449602fa12dde14b97c5c96cf813133 /src/client.cpp
parente3258b78e263c3f95007e1fbc92fcc3a51646f69 (diff)
downloadminetest-22e6fb7056dcc888e9ccf768fefb6c073077a3b5.tar.gz
minetest-22e6fb7056dcc888e9ccf768fefb6c073077a3b5.tar.bz2
minetest-22e6fb7056dcc888e9ccf768fefb6c073077a3b5.zip
ShaderSource and silly example shaders
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(): "