]> git.tdb.fi Git - r2c2.git/commitdiff
Use the new API for defining types in a collection
authorMikko Rasa <tdb@tdb.fi>
Thu, 17 Jan 2013 12:28:30 +0000 (14:28 +0200)
committerMikko Rasa <tdb@tdb.fi>
Thu, 17 Jan 2013 12:28:30 +0000 (14:28 +0200)
source/3d/catalogue.cpp

index 7169c60c3272be579162ec093fdbd1c5672a764e..935219ed75e268347ea654e20d9aa6f56e7215e3 100644 (file)
@@ -16,11 +16,11 @@ Catalogue3D::Catalogue3D(Catalogue &c):
        catalogue(c),
        endpoint_mesh((GL::NORMAL3, GL::VERTEX3))
 {
-       add_creator<GL::Material>(&Catalogue3D::create<GL::Material>);
-       add_creator<GL::Mesh>(&Catalogue3D::create<GL::Mesh>);
-       add_creator<GL::Object>(&Catalogue3D::create2<GL::Object>);
-       add_creator<GL::Program>(&Catalogue3D::create<GL::Program>);
-       add_creator<GL::Technique>(&Catalogue3D::create2<GL::Technique>);
+       add_type<GL::Material>().creator(&Catalogue3D::create<GL::Material>);
+       add_type<GL::Mesh>().creator(&Catalogue3D::create<GL::Mesh>);
+       add_type<GL::Object>().creator(&Catalogue3D::create<GL::Object>);
+       add_type<GL::Program>().creator(&Catalogue3D::create<GL::Program>);
+       add_type<GL::Technique>().creator(&Catalogue3D::create<GL::Technique>);
 
        catalogue.signal_track_added.connect(sigc::mem_fun(this, &Catalogue3D::track_added));
        catalogue.signal_vehicle_added.connect(sigc::mem_fun(this, &Catalogue3D::vehicle_added));