blob: 633d2cddcb2c784c66f92e42278f0fba613112a2 (
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
|
#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();
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});
vec2i get_size() const;
bool is_valid() const;
mgl_texture* internal_texture();
private:
mgl_texture texture;
bool owned = true;
};
}
#endif /* MGLPP_TEXTURE_HPP */
|