mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-13 15:01:49 +00:00
Chunks render moved to ChunksLoader
This commit is contained in:
parent
15bed4169e
commit
f569378b88
12 changed files with 127 additions and 43 deletions
|
|
@ -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_ */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue