]> git.tdb.fi Git - libs/gl.git/blobdiff - source/object.h
Update Object's bounding sphere when mesh is loaded
[libs/gl.git] / source / object.h
index 82e12f14461f0b0b54d03fb3b83ab8b4a62c0c28..f432177e7ebfd7cb221491d58ce35543af66f989 100644 (file)
@@ -5,6 +5,7 @@
 #include "bindable.h"
 #include "renderable.h"
 #include "renderpass.h"
+#include "resourcewatcher.h"
 
 namespace Msp {
 namespace GL {
@@ -23,7 +24,7 @@ In many cases, it's desirable to include multiple copies of an Object in a
 Scene, with different model matrices.  ObjectInstances can be used to alter the
 rendering of an object on a per-instance basis.
 */
-class Object: public Renderable
+class Object: public Renderable, private ResourceWatcher
 {
 public:
        class Loader: public DataFile::CollectionObjectLoader<Object>
@@ -78,6 +79,8 @@ protected:
 
 private:
        const RenderPass *get_pass(const Tag &) const;
+
+       virtual void resource_loaded(Resource &);
 };
 
 } // namespace GL