]> git.tdb.fi Git - libs/gl.git/blobdiff - source/texturing.h
Change Texturing to store index-texture pairs
[libs/gl.git] / source / texturing.h
index 0b3a9751b5f98ebe17f6e55a48fe3d4a998b92c1..79647f1d95a5b0467a106ddac206066f28267111 100644 (file)
@@ -12,7 +12,15 @@ class Texture;
 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();
@@ -24,12 +32,6 @@ 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();