1 #ifndef BLANK_WORLD_CHUNKRENDERER_HPP_
2 #define BLANK_WORLD_CHUNKRENDERER_HPP_
6 #include "../graphics/ArrayTexture.hpp"
7 #include "../model/BlockModel.hpp"
22 /// render_distance in chunks, excluding the base chunk which is always rendered
23 ChunkRenderer(World &, int render_distance);
25 void LoadTextures(const AssetLoader &, const TextureIndex &);
26 void FogDensity(float d) noexcept { fog_density = d; }
28 bool InRange(const Chunk::Pos &) const noexcept;
29 int IndexOf(const Chunk::Pos &) const noexcept;
31 int TotalChunks() const noexcept { return total_length; }
32 int IndexedChunks() const noexcept { return total_indexed; }
33 int MissingChunks() const noexcept { return total_length - total_indexed; }
35 void Rebase(const Chunk::Pos &);
40 void Render(Viewport &);
43 int GetCol(int) const noexcept;
45 void Shift(Block::Face);
49 ArrayTexture block_tex;
56 std::vector<BlockModel> models;
57 std::vector<Chunk *> chunks;