Horizon
wall.hpp
1 #pragma once
2 #include "util/gl_inc.h"
3 #include <unordered_map>
4 
5 namespace horizon {
6 class WallRenderer {
7 public:
8  WallRenderer(class Canvas3DBase &c);
9  void realize();
10  void render();
11  void push();
12 
13 private:
14  Canvas3DBase &ca;
15  std::unordered_map<int, size_t> layer_offsets;
16  size_t n_vertices = 0;
17  void render(int layer);
18 
19  GLuint program;
20  GLuint vao;
21  GLuint vbo;
22 
23  GLuint view_loc;
24  GLuint proj_loc;
25  GLuint layer_thickness_loc;
26  GLuint layer_offset_loc;
27  GLuint layer_color_loc;
28  GLuint cam_normal_loc;
29 };
30 } // namespace horizon