2 #include "common/common.hpp"
3 #include "util/uuid.hpp"
4 #include "color_palette.hpp"
19 bool operator<(
const ObjectRef &other)
const
21 if (type < other.type) {
24 if (type > other.type) {
27 if (uuid < other.uuid) {
30 else if (uuid > other.uuid) {
33 return uuid2 < other.uuid2;
35 bool operator==(
const ObjectRef &other)
const
37 return (type == other.type) && (uuid == other.uuid) && (uuid2 == other.uuid2);
39 bool operator!=(
const ObjectRef &other)
const
41 return !(*
this == other);
53 enum class Type { NONE, TRACK_PREVIEW, TEXT, GRAPHICS, PLANE, POLYGON };
60 static const int FLAG_HIDDEN = 1 << 0;
61 static const int FLAG_HIGHLIGHT = 1 << 1;
62 static const int FLAG_BUTT = 1 << 2;
63 static const int FLAG_GLYPH = 1 << 3;
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));
81 enum class HighlightMode { SKIP, ONLY, ALL };
85 enum class Type { TRIANGLE, LINE, LINE0, LINE_BUTT, GLYPH };
86 std::map<int, std::vector<Triangle>> &triangles;
87 std::map<int, std::map<std::pair<Type, bool>, std::pair<size_t, size_t>>> layer_offsets;
92 GLuint program_line_butt;
93 GLuint program_triangle;
101 void render_layer(
int layer, HighlightMode highlight_mode = HighlightMode::ALL,
bool ignore_flip =
false);
102 void render_layer_with_overlay(
int layer, HighlightMode highlight_mode = HighlightMode::ALL);