Practical Tools for Simple Design
Loading...
Searching...
No Matches
Texture.hpp
1#ifndef CORE_TEXTURE_HPP
2#define CORE_TEXTURE_HPP
3
4#include "pch.hpp" // IWYU pragma: export
5
6namespace Core {
7class Texture {
8public:
9 Texture(GLint format, int width, int height, const void *data, bool useAA);
10 Texture(const Texture &) = delete;
11 Texture(Texture &&texture);
12
13 ~Texture();
14
15 Texture &operator=(const Texture &) = delete;
16 Texture &operator=(Texture &&other);
17
18 GLuint GetTextureId() const { return m_TextureId; }
19
20 void Bind(int slot) const;
21 void Unbind() const;
22
23 void UpdateData(GLint format, int width, int height, const void *data);
24 void UseAntiAliasing(bool useAA);
25
26private:
27 GLuint m_TextureId;
28
29 GLenum m_MinFilter;
30 GLenum m_MagFilter;
31};
32} // namespace Core
33
34#endif
Definition: Texture.hpp:7
Core functionality of the framework
Definition: config.hpp:7