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.
src
engine
graphics
mesh.h
Go to the documentation of this file.
1
/* Conquer Space
2
* Copyright (C) 2021-2023 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
21
namespace
cqsp
{
22
namespace
engine {
23
enum
DrawType
{
ARRAYS
= 0,
ELEMENTS
= 1 };
24
25
class
Mesh
{
26
public
:
27
Mesh
();
28
~Mesh
();
29
30
unsigned
int
VAO
;
31
unsigned
int
VBO
;
32
unsigned
int
EBO
;
33
34
unsigned
int
indicies
;
35
36
unsigned
int
mode
;
37
38
DrawType
buffer_type
=
DrawType::ELEMENTS
;
39
40
void
Draw
();
41
42
static
void
Destroy
(
Mesh
& mesh);
43
};
44
typedef
std::shared_ptr<Mesh>
Mesh_t
;
45
inline
Mesh_t
MakeMesh
() {
return
std::make_shared<Mesh>(); }
46
}
// namespace engine
47
}
// namespace cqsp
cqsp::engine::Mesh
Definition:
mesh.h:25
cqsp::engine::Mesh::Mesh
Mesh()
Definition:
mesh.cpp:21
cqsp::engine::Mesh::Draw
void Draw()
Definition:
mesh.cpp:29
cqsp::engine::Mesh::VAO
unsigned int VAO
Definition:
mesh.h:30
cqsp::engine::Mesh::indicies
unsigned int indicies
Definition:
mesh.h:34
cqsp::engine::Mesh::Destroy
static void Destroy(Mesh &mesh)
Definition:
mesh.cpp:46
cqsp::engine::Mesh::~Mesh
~Mesh()
Definition:
mesh.cpp:23
cqsp::engine::Mesh::VBO
unsigned int VBO
Definition:
mesh.h:31
cqsp::engine::Mesh::buffer_type
DrawType buffer_type
Definition:
mesh.h:38
cqsp::engine::Mesh::EBO
unsigned int EBO
Definition:
mesh.h:32
cqsp::engine::Mesh::mode
unsigned int mode
Definition:
mesh.h:36
cqsp::engine::DrawType
DrawType
Definition:
mesh.h:23
cqsp::engine::ARRAYS
@ ARRAYS
Definition:
mesh.h:23
cqsp::engine::ELEMENTS
@ ELEMENTS
Definition:
mesh.h:23
cqsp::engine::Mesh_t
std::shared_ptr< Mesh > Mesh_t
Definition:
mesh.h:44
cqsp::engine::MakeMesh
Mesh_t MakeMesh()
Definition:
mesh.h:45
cqsp
When adding assets, it is extremely crucial that you read cqsp::asset::AssetLoader::LoadResources to ...
Definition:
clientctx.h:21
Generated on Tue Nov 19 2024 02:58:49 for Conquer Space by
1.9.2