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
TileMap.hpp
Go to the documentation of this file.
1
7
8#ifndef GALAXY_COMPONENTS_TILEMAP_HPP_
9#define GALAXY_COMPONENTS_TILEMAP_HPP_
10
11#include "galaxy/graphics/gl/Texture2D.hpp"
12#include "galaxy/graphics/VertexBatch.hpp"
13
14namespace galaxy
15{
16 namespace components
17 {
21 class TileMap final
22 {
23 public:
27 TileMap();
28
33
38
42 ~TileMap();
43
49 void set_texture(const std::string& texture);
50
56 [[nodiscard]]
57 graphics::Texture2D* get_texture();
58
59 public:
63 graphics::VertexBatch m_batch;
64
69
73 glm::vec4 m_tint;
74
75 private:
79 graphics::Texture2D* m_texture;
80
81 private:
85 TileMap& operator=(const TileMap&) = delete;
86
90 TileMap(const TileMap&) = delete;
91 };
92 } // namespace components
93} // namespace galaxy
94
95#endif
Rendering data for a single level/map in a LDTK world.
Definition TileMap.hpp:22
graphics::VertexBatch m_batch
Vertex data batch.
Definition TileMap.hpp:63
glm::vec4 m_tint
Opacity/tinting.
Definition TileMap.hpp:73
TileMap & operator=(TileMap &&)
Move assignment operator.
Definition TileMap.cpp:31
TileMap & operator=(const TileMap &)=delete
Copy assignment operator.
TileMap(const TileMap &)=delete
Copy constructor.
graphics::Texture2D * get_texture()
Get texture.
Definition TileMap.cpp:64
void set_texture(const std::string &texture)
Sets the texture and vertex data.
Definition TileMap.cpp:49
graphics::Texture2D * m_texture
Tileset.
Definition TileMap.hpp:79
int m_render_layer
Rendering layer.
Definition TileMap.hpp:68
Timer.hpp galaxy.
Definition Async.hpp:17