Horizon
grid.hpp
1 #pragma once
2 #include "common/common.hpp"
3 #include <epoxy/gl.h>
4 
5 namespace horizon {
6 class Grid {
7  friend class CanvasGL;
8 
9 public:
10  Grid(class CanvasGL *c);
11  void realize();
12  void render();
13  void render_cursor(Coord<int64_t> &coord);
14  enum class Style { CROSS, DOT, GRID };
15 
16 private:
17  CanvasGL *ca;
18  int64_t spacing;
19  float mark_size;
20  unsigned int mul = 0;
21 
22  GLuint program;
23  GLuint vao;
24  GLuint vbo;
25 
26  GLuint screenmat_loc;
27  GLuint viewmat_loc;
28  GLuint scale_loc;
29  GLuint grid_size_loc;
30  GLuint grid_0_loc;
31  GLuint grid_mod_loc;
32  GLuint mark_size_loc;
33  GLuint color_loc;
34 };
35 } // namespace horizon
horizon::CanvasGL
Definition: canvas_gl.hpp:15
horizon::Grid
Definition: grid.hpp:6
horizon::Coord< int64_t >
libzip::int64_t
zip_int64_t int64_t
zip_int64_t typedef.
Definition: zip.hpp:103