X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fworld%2FPlanet.hpp;h=900ebbbe8ae4fb6412e337e43566fc7899df1da8;hb=196f02bdbbd372b77141201f045fcfea318093b1;hp=efc804dae6a88e91cbbacafcbfd2c3cd38798bab;hpb=592c7e6d616f2cfacfd4948e17a4bb72f6444488;p=blobs.git diff --git a/src/world/Planet.hpp b/src/world/Planet.hpp index efc804d..900ebbb 100644 --- a/src/world/Planet.hpp +++ b/src/world/Planet.hpp @@ -8,14 +8,14 @@ #include "../graphics/SimpleVAO.hpp" #include -#include +#include #include namespace blobs { namespace world { -struct Tile; +class TileSet; /// A planet has six surfaces, numbered 0 to 5, each filled with /// sidelength² tiles. @@ -63,12 +63,12 @@ public: glm::dvec3 TileCenter(int surface, int x, int y) const noexcept; - void BuildVAOs(); + void BuildVAO(const TileSet &); void Draw(app::Assets &, graphics::Viewport &) override; private: int sidelength; - std::unique_ptr tiles; + std::vector tiles; struct Attributes { glm::vec3 position; @@ -78,8 +78,8 @@ private: }; -void GenerateEarthlike(Planet &) noexcept; -void GenerateTest(Planet &) noexcept; +void GenerateEarthlike(const TileSet &, Planet &) noexcept; +void GenerateTest(const TileSet &, Planet &) noexcept; } }