123456789101112131415161718192021222324252627282930 |
- #ifndef CHUNKRENDERER_H
- #define CHUNKRENDERER_H
- #include "../../engine/Mesh.h"
- #include "../../engine/Shader.h"
- #include "../../engine/Texture.h"
- #include "../../engine/DirectRenderer.h"
- #include "../../world/IChunkListener.h"
- #include "../../math/Camera3D.h"
- class ChunkRenderer : public IChunkListener
- {
- public:
- ChunkRenderer();
- virtual ~ChunkRenderer();
-
- void renderTick(Shader& shader, Camera3D camera, DirectRenderer& dr, float lag);
- void updateChunk(Chunk& c, Chunk* north, Chunk* east, Chunk* south, Chunk* west) override;
- private:
- void buildChunk(int partionY, Chunk& c, Chunk* north, Chunk* east, Chunk* south, Chunk* west);
-
- const int chunkX = 32;
- const int chunkZ = 32;
- NormalTextureMesh* mesh;
-
- Texture blockTexture;
- };
- #endif
|