Symphony Of Empires
borders.hpp
Go to the documentation of this file.
1 // Eng3D - General purpouse game engine
2 // Copyright (C) 2021, Eng3D contributors
3 //
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
13 //
14 // You should have received a copy of the GNU General Public License
15 // along with this program. If not, see <https://www.gnu.org/licenses/>.
16 //
17 // ----------------------------------------------------------------------------
18 // Name:
19 // borders.hpp
20 //
21 // Abstract:
22 // Does some important stuff.
23 // ----------------------------------------------------------------------------
24 
25 #pragma once
26 
27 #include <memory>
28 #include <vector>
29 #include <unordered_set>
30 #include <set>
31 #include "eng3d/curve.hpp"
32 
33 namespace Eng3D {
34  class Texture;
35  class Camera;
36  namespace OpenGL {
37  class Program;
38  }
39  class State;
40 
41  class Borders {
42  Eng3D::State& s;
43  std::vector<std::unique_ptr<Eng3D::Curve>> curves;
44  std::unique_ptr<Eng3D::OpenGL::Program> line_shader;
45  std::shared_ptr<Eng3D::Texture> water_tex;
46  public:
47  Borders(Eng3D::State& s, bool lazy_init = true);
48  ~Borders() = default;
49  void draw(const Eng3D::Camera& camera);
50  private:
51  void build_borders();
52  };
53 
54  // class BorderGenerator
55  // {
56  // public:
57  // std::set<int> walked_positions;
58  // std::vector<std::vector<glm::vec3>>& borders;
59  // uint32_t* pixels;
60  // int width;
61  // int height;
62 
63  // bool check_neighbor(int new_x, int new_y);
64 
65  // void add_neighbor(int new_x, int new_y, int& connections);
66 
67  // void get_border(int x, int y, int connections);
68 
69  // BorderGenerator(std::vector<std::vector<glm::vec3>>& borders, uint32_t* pixels, int width, int height)
70  // : borders{ borders }, pixels{ pixels }, width{ width }, height{ height }
71  // {
72  // walked_positions = std::set<int>();
73  // };
74  // void build_borders();
75  // };
76 }
~Borders()=default
void draw(const Eng3D::Camera &camera)
Definition: borders.cpp:212
Borders(Eng3D::State &s, bool lazy_init=true)
Construct a new Eng 3D::Borders object.
Definition: borders.cpp:39