blob: e4d813a95eafdf0d96d8371fd409dfe142979c74 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
#ifndef LLMR_RENDERER_FILLBUCKET
#define LLMR_RENDERER_FILLBUCKET
#include "bucket.hpp"
#include <vector>
namespace llmr {
class Style;
class FillBuffer;
class BucketDescription;
struct Coordinate;
struct pbf;
class FillBucket : public Bucket {
public:
FillBucket(const std::shared_ptr<FillBuffer>& buffer);
virtual void render(Painter& painter, const std::string& layer_name);
void addGeometry(pbf& data, const BucketDescription& bucket_desc);
void addGeometry(const std::vector<Coordinate>& line, const BucketDescription& bucket_desc);
void drawElements(int32_t attrib);
void drawVertices(int32_t attrib);
private:
std::shared_ptr<FillBuffer> buffer;
struct group {
uint32_t vertex_length;
uint32_t elements_length;
group() : vertex_length(0), elements_length(0) {}
group(uint32_t vertex_length, uint32_t elements_length)
: vertex_length(vertex_length),
elements_length(elements_length) {
}
};
// hold information on where the vertices are located in the FillBuffer
uint32_t vertex_start;
uint32_t elements_start;
uint32_t length;
std::vector<group> groups;
};
}
#endif
|