]> git.tdb.fi Git - libs/gl.git/blobdiff - source/object.cpp
Remove various old deprecated things
[libs/gl.git] / source / object.cpp
index 4a2e5df13f745c82092feb4869eefeb828d4cdba..25daf13ec5dd02fba0bdc17ed9fa6511ab360ebd 100644 (file)
@@ -17,6 +17,8 @@ using namespace std;
 namespace Msp {
 namespace GL {
 
+Matrix Object::identity_matrix;
+
 Object::Object():
        lods(1),
        lod0_watched(false)
@@ -30,11 +32,13 @@ Object::Object(const Mesh *m, const Technique *t):
        set_technique(t);
 }
 
+// TODO should have copy-c'tor to set watch on lod0 mesh if necessary
+
 Object::~Object()
 {
        if(lods[0].mesh && lod0_watched)
                if(ResourceManager *rm = lods[0].mesh->get_manager())
-                       rm->unwatch_resource(*lods[0].mesh, *this);
+                       rm->unobserve_resource(*lods[0].mesh, *this);
 }
 
 Object::LevelOfDetail &Object::get_lod(unsigned i, const char *caller)
@@ -55,7 +59,7 @@ void Object::set_mesh(unsigned i, const Mesh *m)
        RefPtr<const Mesh> &ptr = get_lod(i, "Object::set_mesh").mesh;
        if(i==0 && ptr && lod0_watched)
                if(ResourceManager *rm = ptr->get_manager())
-                       rm->unwatch_resource(*ptr, *this);
+                       rm->unobserve_resource(*ptr, *this);
        ptr = m;
        ptr.keep();
        lod0_watched = false;
@@ -63,7 +67,7 @@ void Object::set_mesh(unsigned i, const Mesh *m)
        if(i==0 && m)
                if(ResourceManager *rm = m->get_manager())
                {
-                       rm->watch_resource(*m, *this);
+                       rm->observe_resource(*m, *this);
                        lod0_watched = true;
                }