- /**
- Renders multiple instances of the object in one go. This may improve
- performance, as the object-specific render setup only has to be done once.
- Each instance's hook functions will be called before and after drawing the
- mesh.
- */
- template<typename Iter>
- void render(Iter begin, Iter end, const Tag &tag=Tag()) const
- { render(get_pass(tag), begin, end); }
-private:
- void setup_render(const ObjectPass &) const;
- void finish_render(const ObjectPass &) const;
- void render(const ObjectPass &, const ObjectInstance *) const;
-
- template<typename Iter>
- void render(const ObjectPass &pass, Iter begin, Iter end) const
- {
- setup_render(pass);
- for(Iter i=begin; i!=end; ++i)
- render_instance(pass, **i);
- finish_render(pass);
- }
+ /** 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;