blob: 8f74afd237c79327d17dbceee686595252651dcb (
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
|
#pragma once
#include <mbgl/util/optional.hpp>
#include <cstddef>
namespace mbgl {
namespace gl {
class Segment {
public:
Segment(std::size_t vertexOffset_,
std::size_t indexOffset_,
std::size_t vertexLength_ = 0,
std::size_t indexLength_ = 0)
: vertexOffset(vertexOffset_),
indexOffset(indexOffset_),
vertexLength(vertexLength_),
indexLength(indexLength_) {}
const std::size_t vertexOffset;
const std::size_t indexOffset;
std::size_t vertexLength;
std::size_t indexLength;
private:
friend class Context;
mutable optional<UniqueVertexArray> vao;
};
template <class Attributes>
class SegmentVector : public std::vector<Segment> {
public:
SegmentVector() = default;
};
} // namespace gl
} // namespace mbgl
|