- virtual bool has_pass(const std::string &) const;
- const ObjectPass &get_pass(const std::string &) const;
-
- /**
- Renders the object. If an ObjectInstance is provided, its hook functions
- are called.
- */
- virtual void render() const;
- virtual void render(const ObjectInstance &) const;
- virtual void render(const std::string &) const;
- virtual void render(const std::string &, const ObjectInstance &) const;
-
- /**
- Renders multiple instances of the object in one go. This may be a
- performance improvement, as the object-specific render setup only has to be
- done once.
- */
- void render(const std::list<const ObjectInstance *> &) const;
- void render(const std::string &, const std::list<const ObjectInstance *> &) const;
+ void set_mesh(const Mesh *m) { set_mesh(0, m); }
+ void set_mesh(unsigned, const Mesh *);
+ const Mesh *get_mesh(unsigned = 0) const;
+ void set_technique(const Technique *);
+ const Technique *get_technique() const { return technique.get(); }
+
+ virtual void render(const Tag &tag = Tag()) const;
+
+ virtual void render(Renderer &, const Tag & = Tag()) const;
+
+ /** Renders an instance of the object. The instance's hook functions are
+ called before and after drawing the mesh. */
+ virtual void render(Renderer &, const ObjectInstance &, const Tag & = Tag()) const;
+
+protected:
+ virtual void setup_render(Renderer &, const Tag &) const { }
+ virtual void finish_render(Renderer &, const Tag &) const { }
+