of each mipmap level are half that of the previous level. The mipmap stack
can be used for texture minification; see the Sampler class for details.
*/
of each mipmap level are half that of the previous level. The mipmap stack
can be used for texture minification; see the Sampler class for details.
*/
- Loader(Texture &);
- Loader(Texture &, Collection &);
+ Loader(Texture &t): Loader(t, 0) { }
+ Loader(Texture &t, Collection &c): Loader(t, &c) { }
- void apply_swizzle();
- void set_parameter_i(GLenum, int) const;
-
-public:
- static bool can_generate_mipmap();
-
- void generate_mipmap();
-protected:
- void generate_mipmap_();
- /** Sets automatic mipmap generation. If enabled, mipmaps are generated
- when a texture image is uploaded. */
- void set_auto_generate_mipmap(bool);
+ PixelFormat get_format() const { return format; }
/// Loads a Graphics::Image from a file and uploads it to the texture.
virtual void load_image(const std::string &, unsigned = 0);
/// Loads a Graphics::Image from a file and uploads it to the texture.
virtual void load_image(const std::string &, unsigned = 0);
/** Uploads an image to the texture. If storage has not been defined, it
will be set to match the image. Otherwise the image must be compatible
with the defined storage. Semantics depend on the type of texture. */
virtual void image(const Graphics::Image &, unsigned = 0) = 0;
/** Uploads an image to the texture. If storage has not been defined, it
will be set to match the image. Otherwise the image must be compatible
with the defined storage. Semantics depend on the type of texture. */
virtual void image(const Graphics::Image &, unsigned = 0) = 0;
- DEPRECATED void image(const Graphics::Image &, bool srgb);
-
- GLenum get_target() const { return target; }
- unsigned get_id() const { return id; }
+ virtual std::uint64_t get_data_size() const { return 0; }