]> git.tdb.fi Git - libs/gl.git/blobdiff - source/core/texture.h
Check the flat qualifier from the correct member
[libs/gl.git] / source / core / texture.h
index 639b15f5b711c820e8ff448f6d634078e2040ded..96b17b8910752e0f0f46f7466b2acf7d014e2746 100644 (file)
@@ -70,23 +70,19 @@ public:
        };
 
 protected:
-       enum FormatSwizzle
-       {
-               NO_SWIZZLE,
-               R_TO_LUMINANCE,
-               RG_TO_LUMINANCE_ALPHA,
-               RGB_TO_BGR
-       };
-
-       PixelFormat format;
-       PixelFormat storage_fmt;
-       FormatSwizzle 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);
+
+       void stage_pixels(void *, const void *, std::size_t);
 
 public:
        PixelFormat get_format() const { return format; }