]> git.tdb.fi Git - libs/gl.git/blobdiff - source/texturing.h
Update deprecated things
[libs/gl.git] / source / texturing.h
index 51070ffa4d06cdbf3291529eef50cb1ca7a27821..2b409d64fb713ee221a4842110832258bd92f711 100644 (file)
@@ -7,36 +7,32 @@
 namespace Msp {
 namespace GL {
 
-class TexEnv;
 class Texture;
 
 class Texturing: public Bindable<Texturing>
 {
 private:
-       struct Attachment
-       {
-               const Texture *tex;
-               const TexEnv *env;
+       std::vector<const Texture *> attachments;
 
-               Attachment();
-       };
-
-       std::vector<Attachment> attachments;
+       static bool legacy_used;
 
 public:
        ~Texturing();
 
        void attach(unsigned, const Texture &);
-       void attach(unsigned, const Texture &, const TexEnv &);
        void detach(unsigned);
 private:
-       void set_attachment(unsigned, const Texture *, const TexEnv *);
-       void bind_attachment(unsigned) const;
+       void set_attachment(unsigned, const Texture *);
+public:
+       const Texture *get_attached_texture(unsigned) const;
+
+private:
+       void bind_attachment(unsigned, bool) const;
 
        static void unbind_attachment(unsigned);
 
 public:
-       void bind() const;
+       void bind(bool = true) const;
 
        static void unbind();
 };