summaryrefslogtreecommitdiff
path: root/src/itemdef.cpp
diff options
context:
space:
mode:
authorRealBadAngel <mk@realbadangel.pl>2013-12-03 17:21:40 +0100
committerPilzAdam <pilzadam@minetest.net>2013-12-03 18:55:25 +0100
commit2330267d2207208799ad347ea0d129c0b4551d61 (patch)
treea4418b0c9fe42ee7944f0531c76f353069735615 /src/itemdef.cpp
parent60113bde74784f4a0125ffa005e9404fbd5cb5b1 (diff)
downloadminetest-2330267d2207208799ad347ea0d129c0b4551d61.tar.gz
minetest-2330267d2207208799ad347ea0d129c0b4551d61.tar.bz2
minetest-2330267d2207208799ad347ea0d129c0b4551d61.zip
Shaders rework.
Diffstat (limited to 'src/itemdef.cpp')
-rw-r--r--src/itemdef.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/itemdef.cpp b/src/itemdef.cpp
index d34d68582..f77a198b5 100644
--- a/src/itemdef.cpp
+++ b/src/itemdef.cpp
@@ -390,16 +390,18 @@ public:
/*
Make a mesh from the node
*/
+ bool reenable_shaders = false;
+ if(g_settings->getBool("enable_shaders")){
+ reenable_shaders = true;
+ g_settings->setBool("enable_shaders",false);
+ }
MeshMakeData mesh_make_data(gamedef);
MapNode mesh_make_node(id, param1, 0);
mesh_make_data.fillSingleNode(&mesh_make_node);
MapBlockMesh mapblock_mesh(&mesh_make_data);
-
scene::IMesh *node_mesh = mapblock_mesh.getMesh();
assert(node_mesh);
video::SColor c(255, 255, 255, 255);
- if(g_settings->getBool("enable_shaders"))
- c = MapBlock_LightColor(255, 0xffff, decode_light(f.light_source));
setMeshColor(node_mesh, c);
/*
@@ -455,6 +457,9 @@ public:
//no way reference count can be smaller than 2 in this place!
assert(cc->wield_mesh->getReferenceCount() >= 2);
+
+ if (reenable_shaders)
+ g_settings->setBool("enable_shaders",true);
}
// Put in cache