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