]> git.tdb.fi Git - libs/gl.git/blobdiff - source/materials/rendermethod.cpp
Use default member initializers for simple types
[libs/gl.git] / source / materials / rendermethod.cpp
index 2c36cd6fa1e132e9eeded8a3066320cac582a0b9..c5ad35d5b3e95976f6c35e047a0ed37fc9e630fc 100644 (file)
@@ -14,16 +14,6 @@ using namespace std;
 namespace Msp {
 namespace GL {
 
-RenderMethod::RenderMethod():
-       shprog(0),
-       shprog_from_material(false),
-       shdata(0),
-       material(0),
-       face_cull(CULL_BACK),
-       receive_shadows(false),
-       image_based_lighting(false)
-{ }
-
 void RenderMethod::set_material_textures()
 {
        const Tag *material_texture_tags = material->get_texture_tags();
@@ -124,12 +114,6 @@ void RenderMethod::set_debug_name(const string &name)
 
 DataFile::Loader::ActionMap RenderMethod::Loader::shared_actions;
 
-RenderMethod::Loader::Loader(RenderMethod &p):
-       DataFile::CollectionObjectLoader<RenderMethod>(p, 0)
-{
-       set_actions(shared_actions);
-}
-
 RenderMethod::Loader::Loader(RenderMethod &p, Collection &c):
        DataFile::CollectionObjectLoader<RenderMethod>(p, &c)
 {
@@ -166,9 +150,7 @@ void RenderMethod::Loader::material_inline()
 {
        Material::GenericLoader ldr(get_collection());
        load_sub_with(ldr);
-       RefPtr<Material> mat = ldr.get_object();
-       get_collection().add(inline_base_name+".mat", mat.get());
-       obj.material = mat.release();
+       obj.material = ldr.store_object(get_collection(), inline_base_name+".mat");
        obj.set_material_textures();
 }