]> git.tdb.fi Git - libs/gl.git/blobdiff - source/render/renderable.h
Check the flat qualifier from the correct member
[libs/gl.git] / source / render / renderable.h
index a8da643029ae03ed5739522431ffd46f5740a1c7..dcb7edd59cc474e97996cd056a3162fe415596aa 100644 (file)
@@ -11,18 +11,19 @@ class Matrix;
 class Renderer;
 
 /**
-Base class for renderable objects.  Rendering is performed with the help of a
-Renderer object.
+Base class for things which can be rendered.  Rendering is performed with the
+help of the Renderer class.
 
-The render method takes a Tag to identify a render method.  It can be used with
-a Technique to select alternative rendering methods, such as simplified shaders
-for a depth-only shadow pass.
+The tag parameter of render() can be used to choose between different render
+methods, such as simplified shaders for a depth-only shadow pass.  Typically
+tags are defined using a Sequence.
 
-The setup_frame and finish_frame methods provide a mechanism for performing
+The setup_frame() and finish_frame() functions can be overridden to perform
 once-per-frame operations.  This is most useful for effects, which may need to
-do auxiliary rendering.  With complex rendering hierarchies, these methods may
-be called multiple times for one frame, but it's guaranteed that no rendering
-will occur before a setup_frame call or after a finish_frame call.
+prepare textures or other data before actual rendering happens.  With complex
+rendering graphs, these functions may be called multiple times for one frame,
+but it's guaranteed that no render() calls will occur before a setup_frame()
+call or after a finish_frame() call.
 */
 class Renderable
 {
@@ -47,7 +48,7 @@ public:
        /** Called when a complete frame has been rendered. */
        virtual void finish_frame() { }
 
-       /** Renders the Renderable.  Implementors should take care to return the
+       /** Renders the Renderable.  Subclasses should take care to return the
        renderer to the state it was in, for example by using Renderer::Push. */
        virtual void render(Renderer &, Tag = Tag()) const = 0;
 };