X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=source%2Fobject.h;h=f0940652992692bfce462258cf0d4a72e58b48ec;hb=4324df6e3d807d35e02e828320e436c509275520;hp=e38afb5c4c1b16fb92946785143bed0fb4824a6d;hpb=01525e40e4bc32b885196dd85ff68e876678d19d;p=libs%2Fgl.git diff --git a/source/object.h b/source/object.h index e38afb5c..f0940652 100644 --- a/source/object.h +++ b/source/object.h @@ -11,6 +11,7 @@ Distributed under the LGPL #include #include #include "objectpass.h" +#include "renderable.h" namespace Msp { namespace GL { @@ -29,7 +30,7 @@ are optional. See also class ObjectInstance. */ -class Object +class Object: public Renderable { private: std::vector meshes; @@ -68,15 +69,17 @@ public: Object(); ~Object(); - bool has_pass(const std::string &) const; + virtual bool has_pass(const std::string &) const; const ObjectPass &get_pass(const std::string &) const; /** Renders the object. If an ObjectInstance is provided, its hook functions are called. */ - void render(const ObjectInstance * =0) const; - void render(const std::string &, const ObjectInstance *) const; + virtual void render() const; + virtual void render(const ObjectInstance &) const; + virtual void render(const std::string &) const; + virtual void render(const std::string &, const ObjectInstance &) const; /** Renders multiple instances of the object in one go. This may be a