blob: 5ef94a0ef324d63642572750861790a4d63eb478 (
plain)
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
|
#ifndef MGLPP_TEXTURE_HPP
#define MGLPP_TEXTURE_HPP
#include "../system/vec.hpp"
extern "C" {
#include <mgl/graphics/texture.h>
}
namespace mgl {
class Image;
class Texture {
public:
struct LoadOptions {
bool compressed;
bool pixel_coordinates;
};
Texture();
Texture(Texture &&other);
~Texture();
static Texture reference(mgl_texture ref);
bool load_from_file(const char *filepath, const LoadOptions load_options = {false, false});
bool load_from_image(Image &image, const LoadOptions load_options = {false, false});
void clear();
vec2i get_size() const;
bool is_valid() const;
mgl_texture* internal_texture();
private:
Texture(const Texture&);
Texture& operator=(const Texture&);
private:
mgl_texture texture;
bool owned = true;
};
}
#endif /* MGLPP_TEXTURE_HPP */
|