2 #include "triangle.hpp"
3 #include "util/gl_inc.h"
6 #include "util/vector_pair.hpp"
9 class TriangleRenderer {
10 friend class CanvasGL;
13 TriangleRenderer(
const class CanvasGL &c,
const std::map<
int, vector_pair<Triangle, TriangleInfo>> &tris);
20 enum class Type { TRIANGLE, LINE, LINE0, LINE_BUTT, GLYPH, CIRCLE };
21 const std::map<int, vector_pair<Triangle, TriangleInfo>> &triangles;
22 std::map<int, std::map<std::pair<Type, bool>, std::pair<size_t, size_t>>> layer_offsets;
27 GLuint program_line_butt;
28 GLuint program_triangle;
29 GLuint program_circle;
37 enum class HighlightMode { SKIP, ONLY };
38 void render_layer(
int layer, HighlightMode highlight_mode,
bool ignore_flip =
false);
39 void render_layer_with_overlay(
int layer, HighlightMode highlight_mode);
40 void render_annotations(
bool top);
41 std::array<float, 4> apply_highlight(
const class Color &color, HighlightMode mode,
int layer)
const;