2 #include "triangle.hpp"
3 #include "util/gl_inc.h"
7 #include "util/vector_pair.hpp"
21 enum class Type { TRIANGLE, LINE, LINE0, LINE_BUTT, GLYPH, CIRCLE, ARC, ARC0 };
22 const std::map<int, vector_pair<Triangle, TriangleInfo>> &triangles;
32 return std::tie(type, highlight, stencil);
36 bool operator<(
const BatchKey &other)
const
38 return tie() < other.tie();
40 bool operator==(
const BatchKey &other)
const
42 return tie() == other.tie();
51 std::map<int, std::map<BatchKey, Span>> layer_offsets;
56 GLuint program_line_butt;
57 GLuint program_triangle;
58 GLuint program_circle;
68 enum class HighlightMode { SKIP, ONLY };
69 void render_layer(
int layer, HighlightMode highlight_mode,
bool ignore_flip =
false);
70 using Batch = std::vector<decltype(layer_offsets)::mapped_type::value_type>;
71 void render_layer_batch(
int layer, HighlightMode highlight_mode,
bool ignore_flip,
const Batch &batch,
72 bool use_stencil,
bool stencil_mode);
73 void render_annotations(
bool top);
74 std::array<float, 4> apply_highlight(
const class Color &color, HighlightMode mode,
int layer)
const;
Definition: canvas_gl.hpp:18
Definition: common.hpp:267
Definition: triangle_renderer.hpp:10
Definition: vector_pair.hpp:8