#pragma once #include #include #include #include #include #include #include #include #include #include #include namespace mbgl { class SymbolBucket : public Bucket { public: SymbolBucket(style::SymbolLayoutProperties::PossiblyEvaluated, const std::map>&, const style::DataDrivenPropertyValue& textSize, const style::DataDrivenPropertyValue& iconSize, float zoom, bool sdfIcons, bool iconsNeedLinear); void upload(gl::Context&) override; void render(Painter&, PaintParameters&, const RenderLayer&, const RenderTile&) override; bool hasData() const override; bool hasTextData() const; bool hasIconData() const; bool hasCollisionBoxData() const; const style::SymbolLayoutProperties::PossiblyEvaluated layout; const bool sdfIcons; const bool iconsNeedLinear; std::map> paintPropertyBinders; std::unique_ptr textSizeBinder; struct TextBuffer { gl::VertexVector vertices; gl::IndexVector triangles; gl::SegmentVector segments; optional> vertexBuffer; optional> indexBuffer; } text; std::unique_ptr iconSizeBinder; struct IconBuffer { gl::VertexVector vertices; gl::IndexVector triangles; gl::SegmentVector segments; optional> vertexBuffer; optional> indexBuffer; } icon; struct CollisionBoxBuffer { gl::VertexVector vertices; gl::IndexVector lines; gl::SegmentVector segments; optional> vertexBuffer; optional> indexBuffer; } collisionBox; SpriteAtlas* spriteAtlas = nullptr; }; } // namespace mbgl