2 #include "common/common.hpp" 3 #include "util/uuid.hpp" 5 #include <unordered_map> 38 bool operator<(
const ObjectRef &other)
const 40 if (type < other.type) {
43 if (type > other.type) {
46 if (uuid < other.uuid) {
49 else if (uuid > other.uuid) {
52 return uuid2 < other.uuid2;
54 bool operator==(
const ObjectRef &other)
const 56 return (type == other.type) && (uuid == other.uuid) && (uuid2 == other.uuid2);
58 bool operator!=(
const ObjectRef &other)
const 60 return !(*
this == other);
72 enum class Type { NONE, TRACK_PREVIEW, TEXT, GRAPHICS, PLANE, POLYGON };
79 static const int FLAG_HIDDEN = 1 << 0;
80 static const int FLAG_HIGHLIGHT = 1 << 1;
81 static const int FLAG_BUTT = 1 << 2;
85 : x0(p0.x), y0(p0.y), x1(p1.x), y1(p1.y), x2(p2.x), y2(p2.y), type(static_cast<uint8_t>(ty)),
86 color(static_cast<uint8_t>(co)), lod(ilod), flags(flg)
89 } __attribute__((packed));
102 std::unordered_map<int, std::vector<Triangle>> &triangles;
103 std::unordered_map<int, size_t> layer_offsets;
111 GLuint screenmat_loc;
115 GLuint layer_color_loc;
116 GLuint layer_flags_loc;
117 GLuint types_visible_loc;
118 GLuint types_force_outline_loc;
119 GLuint highlight_mode_loc;
120 GLuint highlight_dim_loc;
121 GLuint highlight_shadow_loc;
122 GLuint highlight_lighten_loc;
124 void render_layer(
int layer);
125 void render_layer_with_overlay(
int layer);
Definition: triangle.hpp:64
Definition: canvas_gl.hpp:10
This class encapsulates a UUID and allows it to be uses as a value type.
Definition: uuid.hpp:16
Definition: triangle.hpp:91
Definition: triangle.hpp:27