]> git.tdb.fi Git - libs/gl.git/blobdiff - source/texture1d.h
Deprecate the mipmap_levels parameter in Texture
[libs/gl.git] / source / texture1d.h
index 0ab9c6f74734974e2716a7e8843b1e535e40a7d3..52a768759eba68cd26149d61b12c1060161b5460 100644 (file)
@@ -22,22 +22,24 @@ public:
        };
 
 private:
-       PixelFormat ifmt;
        unsigned width;
+       unsigned levels;
        unsigned allocated;
 
 public:
        Texture1D();
 
-       void storage(PixelFormat, unsigned);
+       void storage(PixelFormat, unsigned, unsigned = 0);
        void allocate(unsigned);
        void image(unsigned, PixelFormat, DataType, const void *);
        void sub_image(unsigned, int, unsigned, PixelFormat, DataType, const void *);
-       virtual void image(const Graphics::Image &, bool = false);
+       virtual void image(const Graphics::Image &, unsigned, bool = false);
+       using Texture::image;
        unsigned get_width() const { return width; }
 
 private:
-       unsigned get_level_size(unsigned);
+       unsigned get_n_levels() const;
+       unsigned get_level_size(unsigned) const;
 
 public:
        virtual AsyncLoader *load(IO::Seekable &, const Resources * = 0) { return 0; }