]> git.tdb.fi Git - libs/gl.git/blobdiff - source/renderpass.h
Add compatibility support for slope-based animation interpolation
[libs/gl.git] / source / renderpass.h
index 934a213e3e815f0f855dfc10ca3b9add2c2193e5..3b3b54b8569e12936cf6f8ffb04dbe0d8378ed95 100644 (file)
@@ -12,7 +12,6 @@ class Material;
 class Program;
 class ProgramData;
 class Renderer;
-class TexEnv;
 class Texture;
 class Texturing;
 
@@ -38,6 +37,8 @@ public:
                void texunit(unsigned);
                void texunit_named(unsigned, const std::string &);
                void uniforms();
+               void uniform_slot(const std::string &);
+               void uniform_slot2(const std::string &, const std::string &);
        };
 
 private:
@@ -46,36 +47,38 @@ private:
        private:
                unsigned index;
                RefPtr<Texture> tex;
-               RefPtr<TexEnv> env;
 
        public:
                TextureLoader(Texturing &, unsigned, Collection *);
        private:
                virtual void finish();
 
-               void texenv();
                void texture(const std::string &);
                void texture2d();
        };
 
        const Program *shprog;
-       RefPtr<const ProgramData> shdata;
+       RefPtr<ProgramData> shdata;
+       std::map<std::string, std::string> uniform_slots;
        RefPtr<const Material> material;
+       std::string material_slot;
        Texturing *texturing;
        std::map<std::string, unsigned> tex_names;
        bool back_faces;
 
-       RenderPass &operator=(const RenderPass &);
 public:
        RenderPass();
        RenderPass(const RenderPass &);
+       RenderPass &operator=(const RenderPass &);
        ~RenderPass();
 
        void set_shader_program(const Program *, const ProgramData *);
        const Program *get_shader_program() const { return shprog; }
        const ProgramData *get_shader_data() const { return shdata.get(); }
+       const std::string &get_slotted_uniform_name(const std::string &) const;
        void set_material(const Material *);
        const Material *get_material() const { return material.get(); }
+       const std::string &get_material_slot_name() const { return material_slot; }
        void set_texture(unsigned, const Texture *);
        const Texturing *get_texturing() const { return texturing; }
        int get_texture_index(const std::string &) const;