- void bind() const;
- void parameter(GLenum, int);
- void parameter(GLenum, float);
- void set_min_filter(TextureFilter f) { parameter(GL_TEXTURE_MIN_FILTER, f); }
- void set_mag_filter(TextureFilter f) { parameter(GL_TEXTURE_MAG_FILTER, f); }
- GLenum get_target() const { return target; }
- uint get_id() const { return id; }
+protected:
+ static DataType get_alloc_type(PixelFormat);
+
+ void update_parameter(int) const;
+public:
+ void set_min_filter(TextureFilter);
+ void set_mag_filter(TextureFilter);
+
+ /** Sets filter for both minification and magnification. Since mipmapping
+ is not applicable to magnification, LINEAR is used instead. */
+ void set_filter(TextureFilter);
+
+ void set_max_anisotropy(float);
+
+ /** Sets the wrapping mode for all coordinates. */
+ void set_wrap(TextureWrap);
+
+ void set_wrap_s(TextureWrap);
+ void set_wrap_t(TextureWrap);
+ void set_wrap_r(TextureWrap);
+
+ /** Sets automatic mipmap generation. If enabled, mipmaps are generated
+ when a texture image is uploaded. */
+ void set_generate_mipmap(bool);