blob: 3aa877379ff50b02fd8ce396780996bb91eef635 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
#ifndef TEXTURE_H_84EC6DF6
#define TEXTURE_H_84EC6DF6
#include "wrappers.h"
struct Rectangle {
int x;
int y;
int w;
int h;
};
class Texture {
public:
Texture(int width, int height);
Texture(const char* file);
Texture(const Texture& tex);
Texture(Texture&& tex);
Texture& operator= (Texture tex);
friend void swap(Texture& tex1, Texture& tex2);
Rectangle entirety() const;
inline GLuint getId() const
{
return texture_.getId();
}
inline int getWidth() const
{
return width_;
}
inline int getHeight() const
{
return height_;
}
private:
GLTexture texture_;
int width_;
int height_;
};
#endif /* end of include guard: TEXTURE_H_84EC6DF6 */
|