mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 00:25:19 +02:00
Decouple MeshMakeData from Client
This commit is contained in:
@@ -27,6 +27,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
#include <unordered_map>
|
||||
|
||||
class Client;
|
||||
class NodeDefManager;
|
||||
class IShaderSource;
|
||||
|
||||
/*
|
||||
@@ -43,13 +44,12 @@ struct MeshMakeData
|
||||
v3s16 m_blockpos = v3s16(-1337,-1337,-1337);
|
||||
v3s16 m_crack_pos_relative = v3s16(-1337,-1337,-1337);
|
||||
bool m_smooth_lighting = false;
|
||||
MeshGrid m_mesh_grid;
|
||||
u16 side_length;
|
||||
|
||||
Client *m_client;
|
||||
const NodeDefManager *nodedef;
|
||||
bool m_use_shaders;
|
||||
|
||||
MeshMakeData(Client *client, bool use_shaders);
|
||||
MeshMakeData(const NodeDefManager *ndef, u16 side_length, bool use_shaders);
|
||||
|
||||
/*
|
||||
Copy block data manually (to allow optimizations by the caller)
|
||||
@@ -179,7 +179,7 @@ class MapBlockMesh
|
||||
{
|
||||
public:
|
||||
// Builds the mesh given
|
||||
MapBlockMesh(MeshMakeData *data, v3s16 camera_offset);
|
||||
MapBlockMesh(Client *client, MeshMakeData *data, v3s16 camera_offset);
|
||||
~MapBlockMesh();
|
||||
|
||||
// Main animation function, parameters:
|
||||
|
Reference in New Issue
Block a user