#pragma once #include class ExampleCustomDrawableStyleLayerHost : public mbgl::style::CustomDrawableLayerHost { public: using VertexVector = mbgl::gfx::VertexVector; using TriangleIndexVector = mbgl::gfx::IndexVector; ExampleCustomDrawableStyleLayerHost(const std::string& assetsPath); ~ExampleCustomDrawableStyleLayerHost(); void initialize() override; void deinitialize() override; void update(Interface& interface) override; protected: static mbgl::Point project(const mbgl::LatLng& c, const mbgl::TransformState& s); void createDrawables(Interface& interface); void generateGeometry(Interface& interface); void loadGeometry(Interface& interface); void importObj(Interface& interface, const std::string& filename, VertexVector& vertices, TriangleIndexVector& indices, Interface::GeometryOptions& options); mbgl::gfx::Texture2DPtr createCheckerboardTexture(Interface& interface, uint16_t wb, uint16_t hb, uint16_t blockSize, const std::array& color1, const std::array& color2); protected: const std::string assetsPath; };