Conquer Space 0.0.0
A space themed grand strategy game set in the near future, with realistic orbital mechanics, and an emphasis on economics and politics.
renderer.h
Go to the documentation of this file.
1/* Conquer Space
2 * Copyright (C) 2021-2025 Conquer Space
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#pragma once
18
19#include <memory>
20#include <vector>
21
22#include <glm/glm.hpp>
23
25
26namespace cqsp::engine {
27void Draw(Renderable &);
28void Draw(Renderable &, asset::ShaderProgram_t &shader);
29void Draw(Renderable &, asset::ShaderProgram *shader);
30
31typedef std::shared_ptr<Renderable> BasicRendererObject;
32
34
36 public:
38 glm::mat4 projection = glm::mat4(1.0);
39 glm::mat4 view = glm::mat4(1.0);
40 std::vector<BasicRendererObject> renderables;
41 void Draw();
42};
43} // namespace cqsp::engine
Definition: renderer.h:35
void Draw()
Definition: renderer.cpp:83
glm::mat4 projection
Definition: renderer.h:38
glm::mat4 view
Definition: renderer.h:39
std::vector< BasicRendererObject > renderables
Definition: renderer.h:40
std::shared_ptr< ShaderProgram > ShaderProgram_t
The preferred way of using a shader program.
Definition: shader.h:113
Definition: application.cpp:55
void Draw(Renderable &)
Definition: renderer.cpp:27
std::shared_ptr< Renderable > BasicRendererObject
Definition: renderer.h:31
BasicRendererObject MakeRenderable()
Definition: renderer.cpp:77