The Renderer class is the way of the future and should be used whenever
possible.
throw invalid_operation("Renderable::render");
}
-void Renderable::render(Renderer &renderer, const Tag &tag) const
-{
- renderer.escape();
- render(tag);
-}
-
} // namespace Msp
} // namespace GL
class Renderer;
+/**
+Base class for renderable objects. All Renderables must support rendering with
+a Renderer, and may optionally provide support for standalone rendering.
+*/
class Renderable
{
protected:
virtual long get_instance_key() const { return 0; }
virtual void render(const Tag & = Tag()) const;
- virtual void render(Renderer &, const Tag & = Tag()) const;
+ virtual void render(Renderer &, const Tag & = Tag()) const = 0;
};
} // namespace Msp