Horizon
cover.hpp
1 #pragma once
2 #include <epoxy/gl.h>
3 #include <unordered_map>
4 
5 namespace horizon {
6 class CoverRenderer {
7 public:
8  CoverRenderer(class Canvas3D *c);
9  void realize();
10  void render();
11  void push();
12 
13 private:
14  Canvas3D *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
horizon::Canvas3D
Definition: canvas3d.hpp:17
horizon::CoverRenderer
Definition: cover.hpp:6