feat: terrain mesh material
This commit is contained in:
parent
957a39af14
commit
becef85f20
3 changed files with 223 additions and 30 deletions
|
|
@ -5,6 +5,7 @@
|
|||
#include "core/os/thread.h"
|
||||
#include "core/templates/vector.h"
|
||||
#include "scene/main/node.h"
|
||||
#include "scene/resources/material.h"
|
||||
class TerrainChunkMesh;
|
||||
class TerrainModifier;
|
||||
|
||||
|
|
@ -26,6 +27,7 @@ public:
|
|||
void mesh_dirty(TerrainChunkMesh *mesh);
|
||||
|
||||
private:
|
||||
Ref<Material> mesh_material{};
|
||||
Vector<TerrainChunkMesh *> workload{};
|
||||
bool threads_stop{ false };
|
||||
Mutex workload_lock;
|
||||
|
|
@ -42,6 +44,8 @@ private:
|
|||
size_t detail{ 1 };
|
||||
|
||||
public:
|
||||
void set_mesh_material(Ref<Material> material);
|
||||
Ref<Material> get_mesh_material() const;
|
||||
void set_side_length(size_t length);
|
||||
size_t get_side_length() const;
|
||||
void set_chunk_size(size_t size);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue