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.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 {
27namespace engine {
28void Draw(Renderable &);
29void Draw(Renderable &, asset::ShaderProgram_t &shader);
30void Draw(Renderable &, asset::ShaderProgram *shader);
31
32typedef std::shared_ptr<Renderable> BasicRendererObject;
33
35
37 public:
39 glm::mat4 projection = glm::mat4(1.0);
40 glm::mat4 view = glm::mat4(1.0);
41 std::vector<BasicRendererObject> renderables;
42 void Draw();
43};
44} // namespace engine
45} // namespace cqsp
Definition: renderer.h:36
void Draw()
Definition: renderer.cpp:83
glm::mat4 projection
Definition: renderer.h:39
glm::mat4 view
Definition: renderer.h:40
std::vector< BasicRendererObject > renderables
Definition: renderer.h:41
std::shared_ptr< ShaderProgram > ShaderProgram_t
The preferred way of using a shader program.
Definition: shader.h:114
void Draw(Renderable &)
Definition: renderer.cpp:27
std::shared_ptr< Renderable > BasicRendererObject
Definition: renderer.h:32
BasicRendererObject MakeRenderable()
Definition: renderer.cpp:77
When adding assets, it is extremely crucial that you read cqsp::asset::AssetLoader::LoadResources to ...
Definition: clientctx.h:22