#ifndef LLMR_RENDERER_LINEBUCKET #define LLMR_RENDERER_LINEBUCKET #include "bucket.hpp" #include #include #include #include #include namespace llmr { class Style; class LineVertexBuffer; class TriangleElementsBuffer; class LineShader; class LinejoinShader; struct pbf; class LineBucket : public Bucket { typedef ElementGroup triangle_group_type; typedef ElementGroup point_group_type; public: LineBucket(const std::shared_ptr& vertexBuffer, const std::shared_ptr& triangleElementsBuffer, const std::shared_ptr& pointElementsBuffer, const BucketDescription& bucket_desc); virtual void render(Painter& painter, const std::string& layer_name, const Tile::ID& id); void addGeometry(pbf& data); void addGeometry(const std::vector& line); bool empty() const; bool hasPoints() const; void drawLines(LineShader& shader); void drawPoints(LinejoinShader& shader); public: const BucketGeometryDescription geometry; private: std::shared_ptr vertexBuffer; std::shared_ptr triangleElementsBuffer; std::shared_ptr pointElementsBuffer; const size_t vertex_start; const size_t triangle_elements_start; const size_t point_elements_start; std::vector triangleGroups; std::vector pointGroups; }; } #endif