X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fobject.h;h=c8e372601077c1b1e9c43dd82a221b53b1a904a7;hp=a11bfd9b654d0ffa98887fefcb2c886a360e1d98;hb=42c1534d95e1551c37e64a1dae288e8b75e8d8ba;hpb=84269f7b598673b06757313d70934a1747045b69 diff --git a/source/object.h b/source/object.h index a11bfd9b..c8e37260 100644 --- a/source/object.h +++ b/source/object.h @@ -5,7 +5,7 @@ #include "bindable.h" #include "renderable.h" #include "renderpass.h" -#include "resourcewatcher.h" +#include "resourceobserver.h" namespace Msp { namespace GL { @@ -28,7 +28,7 @@ Objects can have multiple levels of detail. The most detailed level has index 0, with increasing indices having less detail. When rendering an instance, the instance's get_level_of_detail method is called to determine which LoD to use. */ -class Object: public Renderable, private ResourceWatcher +class Object: public Renderable, private ResourceObserver { private: struct LevelOfDetail; @@ -72,6 +72,7 @@ private: std::vector lods; Geometry::BoundingSphere bounding_sphere; + bool lod0_watched; public: Object(); @@ -106,8 +107,6 @@ public: virtual const Geometry::BoundingSphere *get_bounding_sphere() const { return &bounding_sphere; } - virtual void render(const Tag &tag = Tag()) const; - virtual void render(Renderer &, const Tag & = Tag()) const; /** Renders an instance of the object. The instance's hook functions are @@ -122,6 +121,7 @@ private: const RenderPass *get_pass(const Tag &, unsigned) const; virtual void resource_loaded(Resource &); + virtual void resource_removed(Resource &); }; } // namespace GL