projects
/
oweals
/
minetest.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove FPS from being next to the version string
[oweals/minetest.git]
/
src
/
itemdef.cpp
diff --git
a/src/itemdef.cpp
b/src/itemdef.cpp
index d34d68582a77004b21f07725f6786f44e115e59e..10e1afe2dbaedcf160e1ad692a5030d0ffda3b8e 100644
(file)
--- a/
src/itemdef.cpp
+++ b/
src/itemdef.cpp
@@
-38,6
+38,10
@@
with this program; if not, write to the Free Software Foundation, Inc.,
#include <map>
#include <set>
#include <map>
#include <set>
+#ifdef __ANDROID__
+#include <GLES/gl.h>
+#endif
+
/*
ItemDefinition
*/
/*
ItemDefinition
*/
@@
-390,16
+394,18
@@
public:
/*
Make a mesh from the node
*/
/*
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);
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);
-
+ MapBlockMesh mapblock_mesh(&mesh_make_data, v3s16(0, 0, 0));
scene::IMesh *node_mesh = mapblock_mesh.getMesh();
assert(node_mesh);
video::SColor c(255, 255, 255, 255);
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);
/*
setMeshColor(node_mesh, c);
/*
@@
-431,6
+437,11
@@
public:
params.light_color.set(1.0, 0.5, 0.5, 0.5);
params.light_radius = 1000;
params.light_color.set(1.0, 0.5, 0.5, 0.5);
params.light_radius = 1000;
+#ifdef __ANDROID__
+ params.camera_position.set(0, -1.0, -1.5);
+ params.camera_position.rotateXZBy(45);
+ params.light_position.set(10, -100, -50);
+#endif
cc->inventory_texture =
tsrc->generateTextureFromMesh(params);
cc->inventory_texture =
tsrc->generateTextureFromMesh(params);
@@
-455,6
+466,9
@@
public:
//no way reference count can be smaller than 2 in this place!
assert(cc->wield_mesh->getReferenceCount() >= 2);
//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
}
// Put in cache
@@
-637,6
+651,7
@@
public:
void processQueue(IGameDef *gamedef)
{
#ifndef SERVER
void processQueue(IGameDef *gamedef)
{
#ifndef SERVER
+ //NOTE this is only thread safe for ONE consumer thread!
while(!m_get_clientcached_queue.empty())
{
GetRequest<std::string, ClientCached*, u8, u8>
while(!m_get_clientcached_queue.empty())
{
GetRequest<std::string, ClientCached*, u8, u8>