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
Point.cpp
Go to the documentation of this file.
1
7
8#include <glad/glad.h>
9
10#include "galaxy/meta/Memory.hpp"
11
12#include "Point.hpp"
13
14namespace galaxy
15{
16 namespace graphics
17 {
19 {
20 m_mode = GL_POINTS;
21 }
22
24 {
25 }
26
27 void Point::create(const glm::vec2& pos)
28 {
29 m_pos = pos;
30
31 graphics::Vertex vertex;
32 vertex.m_pos = m_pos;
33
34 meta::vector<unsigned int> indices = {0u};
35 meta::vector<graphics::Vertex> vertices = {vertex};
36
38 }
39
40 const glm::vec2& Point::pos() const
41 {
42 return m_pos;
43 }
44 } // namespace graphics
45} // namespace galaxy
thread_local const float vertices[]
Video.cpp galaxy.
Definition Video.cpp:19
thread_local const unsigned int indices[]
Definition Video.cpp:21
virtual ~Point()
Destructor.
Definition Point.cpp:23
glm::vec2 m_pos
Position.
Definition Point.hpp:62
void create(const glm::vec2 &pos)
Initial point positon.
Definition Point.cpp:27
const glm::vec2 & pos() const
Get pos.
Definition Point.cpp:40
Point()
Constructor.
Definition Point.cpp:18
VertexArray m_vao
Vertex Array Object.
Definition Shape.hpp:105
unsigned int m_mode
Type to render i.e. GL_LINES, GL_TRIANGLES, etc.
Definition Shape.hpp:90
void buffer(std::span< Vertex > vertices, std::span< unsigned int > indicies)
Create vertex array object.
Animated.cpp galaxy.
Definition Animated.cpp:16
Represents a single vertex point.
Definition Vertex.hpp:25
glm::vec2 m_pos
Position..
Definition Vertex.hpp:29