My Project
Loading...
Searching...
No Matches
textures.hh
Go to the documentation of this file.
1#pragma once
2#include <string>
3
4class Texture
5{
6private:
7 unsigned int t_render_id;
8 std::string t_filepath;
9 unsigned char *t_localbuffer;
11
12public:
13 explicit Texture(const std::string &file, const bool repeat = false);
14 ~Texture();
15
16 void bind(unsigned int slot = 0) const;
17 void unbind() const;
18
19 inline int
20 get_width() const
21 {
22 return t_width;
23 };
24 inline int
25 get_height() const
26 {
27 return t_height;
28 };
29};
Definition textures.hh:5
int get_height() const
Definition textures.hh:25
int get_width() const
Definition textures.hh:20
~Texture()
Definition textures.cpp:44
int t_bpp
Definition textures.hh:10
void unbind() const
Definition textures.cpp:56
std::string t_filepath
Definition textures.hh:8
void bind(unsigned int slot=0) const
Definition textures.cpp:49
int t_height
Definition textures.hh:10
unsigned char * t_localbuffer
Definition textures.hh:9
int t_width
Definition textures.hh:10
unsigned int t_render_id
Definition textures.hh:7