blob: 71764af4fd707cf677c2d8c303ce6696f4e3033a (
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
|
#ifndef LLMR_GEOMETRY_FILLBUCKET
#define LLMR_GEOMETRY_FILLBUCKET
#include "bucket.hpp"
#include <vector>
namespace llmr {
class Style;
class FillBuffer;
struct pbf;
class FillBucket : public Bucket {
public:
FillBucket(FillBuffer& buffer);
virtual void render(Painter& painter, const std::string& layer_name);
void addGeometry(pbf& data);
void drawElements(int32_t attrib);
void drawVertices(int32_t attrib);
private:
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
|