2 #include "common/common.hpp" 3 #include "util/uuid.hpp" 4 #include "color_palette.hpp" 6 #include <unordered_map> 20 bool operator<(
const ObjectRef &other)
const 22 if (type < other.type) {
25 if (type > other.type) {
28 if (uuid < other.uuid) {
31 else if (uuid > other.uuid) {
34 return uuid2 < other.uuid2;
36 bool operator==(
const ObjectRef &other)
const 38 return (type == other.type) && (uuid == other.uuid) && (uuid2 == other.uuid2);
40 bool operator!=(
const ObjectRef &other)
const 42 return !(*
this == other);
54 enum class Type { NONE, TRACK_PREVIEW, TEXT, GRAPHICS, PLANE, POLYGON };
61 static const int FLAG_HIDDEN = 1 << 0;
62 static const int FLAG_HIGHLIGHT = 1 << 1;
63 static const int FLAG_BUTT = 1 << 2;
67 : x0(p0.x), y0(p0.y), x1(p1.x), y1(p1.y), x2(p2.x), y2(p2.y), type(static_cast<uint8_t>(ty)),
68 color(static_cast<uint8_t>(co)), lod(ilod), flags(flg)
71 } __attribute__((packed));
84 enum class Type { TRIANGLE, LINE, LINE0, LINE_BUTT, GLYPH };
85 std::unordered_map<int, std::vector<Triangle>> &triangles;
86 std::unordered_map<int, std::unordered_map<Type, std::pair<size_t, size_t>>> layer_offsets;
91 GLuint program_line_butt;
92 GLuint program_triangle;
98 void render_layer(
int layer);
99 void render_layer_with_overlay(
int layer);
Definition: triangle.hpp:46
Definition: canvas_gl.hpp:13
This class encapsulates a UUID and allows it to be uses as a value type.
Definition: uuid.hpp:16
Definition: triangle.hpp:73
Definition: triangle.hpp:9