- /**
- 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
- {
- const RenderPass *pass = get_pass(tag);
- if(!pass)
- return;
-
- Bind bind(pass);
- for(Iter i=begin; i!=end; ++i)
- render_instance(**i, tag);
- }