]> git.tdb.fi Git - libs/gl.git/blobdiff - source/core/texture.h
Require buffer to have storage for mapping
[libs/gl.git] / source / core / texture.h
index f6436c0acc8f6e51d7d8679710bbaf47ad29b67b..eb5275c6e4fd71e60b6d0af04d179a229a94a56a 100644 (file)
@@ -70,15 +70,17 @@ public:
        };
 
 protected:
-       PixelFormat format;
-       PixelFormat storage_fmt;
-       ComponentSwizzle swizzle;
-       bool use_srgb_format;
-       bool auto_gen_mipmap;
+       PixelFormat format = NO_PIXELFORMAT;
+       PixelFormat storage_fmt = NO_PIXELFORMAT;
+       ComponentSwizzle swizzle = NO_SWIZZLE;
+       unsigned n_levels = 0;
+       bool use_srgb_format = false;
+       bool auto_gen_mipmap = false;
 
        Texture(unsigned);
 
        void set_format(PixelFormat);
+       static unsigned count_levels(unsigned);
 
 public:
        PixelFormat get_format() const { return format; }