Carpenter Engine
A C++ game engine with a build once run anywhere solution
Loading...
Searching...
No Matches
Texture.hpp
1/*
2 * This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at https://mozilla.org/MPL/2.0/.
5 */
6
7#ifndef ENGINE_TEXTURE
8#define ENGINE_TEXTURE
9
10#include "../Utils.hpp"
11
12namespace Engine::Graphics {
13
35 class Texture {
36 private:
37 unsigned int m_texture = -1;
38 int m_dimensions[2];
39 const char* m_filename;
40
41 AssetRequest m_request;
42
43
50 unsigned LoadTexture();
51
52 public:
53
64 Texture(const char* path);
65
75 unsigned GetTexture();
76
77
78 };
79};
80
81#endif
A wrapper class for a texture for the game engine.
Definition Texture.hpp:35
unsigned GetTexture()
Returns the id of the texture.
Definition Texture.cpp:64
A struct used to manage asset pulling.
Definition Utils.hpp:40