Chunks render moved to ChunksLoader

This commit is contained in:
MihailRis
2022-06-29 19:30:23 +03:00
committed by GitHub
parent 15bed4169e
commit f569378b88
12 changed files with 127 additions and 43 deletions
+9
View File
@@ -1,6 +1,8 @@
#ifndef VOXELS_CHUNK_H_
#define VOXELS_CHUNK_H_
#include <stdlib.h>
#define CHUNK_W 16
#define CHUNK_H 256
#define CHUNK_D 16
@@ -9,6 +11,11 @@
class voxel;
class Lightmap;
struct RenderData {
float* vertices;
size_t size;
};
class Chunk {
public:
int x,y,z;
@@ -19,6 +26,8 @@ public:
bool loaded = false;
int surrounding = 0;
int references = 1;
RenderData renderData;
Chunk(int x, int y, int z);
~Chunk();