galaxy
1.0.0
Real-Time C++23 Game Programming Framework. Built on data-driven design principles and agile software engineering.
Loading...
Searching...
No Matches
Vertex.cpp
Go to the documentation of this file.
1
7
8
#include "
Vertex.hpp
"
9
10
namespace
galaxy
11
{
12
namespace
graphics
13
{
14
std::array<Vertex, 4>
gen_quad_vertices
(
const
float
width,
const
float
height)
15
{
16
// clang-format off
17
const
std::array<graphics::Vertex, 4>
vertices
=
18
{
19
graphics::Vertex
{.m_pos = glm::vec2 {0.0f, 0.0f},
20
.m_texels = glm::vec2 {0.0f, 0.0f}
21
},
22
graphics::Vertex
{.m_pos = glm::vec2 {width, 0.0f},
23
.m_texels = glm::vec2 {1.0f, 0.0f}
24
},
25
graphics::Vertex
{.m_pos = glm::vec2 {width, height},
26
.m_texels = glm::vec2 {1.0f, 1.0f}
27
},
28
graphics::Vertex
{.m_pos = glm::vec2 {0.0f, height},
29
.m_texels = glm::vec2 {0.0f, 1.0f}
30
}
31
};
32
// clang-format on
33
34
return
vertices
;
35
}
36
37
std::array<unsigned int, 6>
gen_default_indices
()
38
{
39
return
{0u, 1u, 3u, 1u, 2u, 3u};
40
}
41
42
}
// namespace graphics
43
}
// namespace galaxy
Vertex.hpp
vertices
thread_local const float vertices[]
Video.cpp galaxy.
Definition
Video.cpp:19
galaxy::graphics::gen_quad_vertices
std::array< Vertex, 4 > gen_quad_vertices(const float width, const float height)
Generate some default verticies.
Definition
Vertex.cpp:14
galaxy::graphics::gen_default_indices
std::array< unsigned int, 6 > gen_default_indices()
Generate some default indicies.
Definition
Vertex.cpp:37
galaxy
Animated.cpp galaxy.
Definition
Animated.cpp:16
galaxy::graphics::Vertex
Represents a single vertex point.
Definition
Vertex.hpp:25
galaxy
src
galaxy
graphics
gl
Vertex.cpp
Generated on Fri Sep 12 2025 07:29:47 for galaxy by
1.12.0