class Texturing: public Bindable<Texturing>
{
private:
- std::vector<const Texture *> attachments;
+ struct Attachment
+ {
+ unsigned unit;
+ const Texture *texture;
+
+ Attachment(unsigned, const Texture *);
+ };
+
+ std::vector<Attachment> attachments;
public:
~Texturing();
+ int find_free_unit(const std::string & = std::string()) const;
void attach(unsigned, const Texture &);
void detach(unsigned);
private:
public:
const Texture *get_attached_texture(unsigned) const;
-private:
- void bind_attachment(unsigned) const;
-
- static void unbind_attachment(unsigned);
-
-public:
void bind() const;
static void unbind();