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
+6 -4
View File
@@ -2,18 +2,20 @@
#define GRAPHICS_VOXELRENDERER_H_
#include <stdlib.h>
#include <vector>
class Mesh;
class Chunk;
#define CHUNK_VERTEX_SIZE (3 + 2 + 4)
class VoxelRenderer {
float* buffer;
size_t capacity;
public:
VoxelRenderer(size_t capacity);
std::vector<float> buffer;
VoxelRenderer();
~VoxelRenderer();
Mesh* render(Chunk* chunk, const Chunk** chunks);
const float* render(Chunk* chunk, const Chunk** chunks, size_t& size);
};
#endif /* GRAPHICS_VOXELRENDERER_H_ */