]> git.tdb.fi Git - libs/gl.git/blobdiff - source/texture1d.h
Allow texture mipmap levels to be specified in datafiles
[libs/gl.git] / source / texture1d.h
index ee930a8721a80205507deed18c73536a7584efe4..eb16696f988811ca237d7c0bebd2e158622c6cbb 100644 (file)
@@ -19,24 +19,28 @@ public:
 
                void raw_data(const std::string &);
                void storage(PixelFormat, unsigned);
+               void storage_levels(PixelFormat, unsigned, unsigned);
        };
 
 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 *);
-       virtual void image(const Graphics::Image &, bool = false);
+       void sub_image(unsigned, int, unsigned, PixelFormat, DataType, const void *);
+       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; }