aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/mglpp/graphics/Texture.hpp10
-rw-r--r--include/mglpp/system/MemoryMappedFile.hpp4
2 files changed, 8 insertions, 6 deletions
diff --git a/include/mglpp/graphics/Texture.hpp b/include/mglpp/graphics/Texture.hpp
index 906818c..8bd2df6 100644
--- a/include/mglpp/graphics/Texture.hpp
+++ b/include/mglpp/graphics/Texture.hpp
@@ -12,8 +12,9 @@ namespace mgl {
class Texture {
public:
struct LoadOptions {
- bool compressed;
- bool pixel_coordinates;
+ bool compressed = false;
+ bool pixel_coordinates = false;
+ bool mipmap = false; /* available since opengl 3.0 */
};
Texture();
@@ -23,8 +24,9 @@ namespace mgl {
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});
+ bool load_from_file(const char *filepath, const LoadOptions load_options = {false, false, false});
+ bool load_from_image(Image &image, const LoadOptions load_options = {false, false, false});
+ bool load_from_memory(const unsigned char *data, int width, int height, mgl_image_format format, LoadOptions load_options = {false, false, false});
void clear();
vec2i get_size() const;
bool is_valid() const;
diff --git a/include/mglpp/system/MemoryMappedFile.hpp b/include/mglpp/system/MemoryMappedFile.hpp
index 1be23d4..57f3c67 100644
--- a/include/mglpp/system/MemoryMappedFile.hpp
+++ b/include/mglpp/system/MemoryMappedFile.hpp
@@ -9,8 +9,8 @@ namespace mgl {
class MemoryMappedFile {
public:
struct LoadOptions {
- bool readable;
- bool writable;
+ bool readable = true;
+ bool writable = true;
};
MemoryMappedFile();