From: Mikko Rasa Date: Sun, 26 Aug 2012 17:32:02 +0000 (+0300) Subject: Drop support for Renderables that don't accept a Renderer X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=18878df418035445ba5146fcde3d647d7aa8c054;p=libs%2Fgl.git Drop support for Renderables that don't accept a Renderer The Renderer class is the way of the future and should be used whenever possible. --- diff --git a/source/renderable.cpp b/source/renderable.cpp index a41794c6..568df05b 100644 --- a/source/renderable.cpp +++ b/source/renderable.cpp @@ -10,11 +10,5 @@ void Renderable::render(const Tag &) const throw invalid_operation("Renderable::render"); } -void Renderable::render(Renderer &renderer, const Tag &tag) const -{ - renderer.escape(); - render(tag); -} - } // namespace Msp } // namespace GL diff --git a/source/renderable.h b/source/renderable.h index c055cefa..78879a3d 100644 --- a/source/renderable.h +++ b/source/renderable.h @@ -9,6 +9,10 @@ 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: @@ -20,7 +24,7 @@ public: 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