X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fmaterials%2Frendermethod.cpp;h=c5ad35d5b3e95976f6c35e047a0ed37fc9e630fc;hp=2c36cd6fa1e132e9eeded8a3066320cac582a0b9;hb=38712d8ecc57d043a2419ffbaeeb57f7a6586f14;hpb=23d4100160bfa33359ce297b6b36244abcaa5f82 diff --git a/source/materials/rendermethod.cpp b/source/materials/rendermethod.cpp index 2c36cd6f..c5ad35d5 100644 --- a/source/materials/rendermethod.cpp +++ b/source/materials/rendermethod.cpp @@ -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(p, 0) -{ - set_actions(shared_actions); -} - RenderMethod::Loader::Loader(RenderMethod &p, Collection &c): DataFile::CollectionObjectLoader(p, &c) { @@ -166,9 +150,7 @@ void RenderMethod::Loader::material_inline() { Material::GenericLoader ldr(get_collection()); load_sub_with(ldr); - RefPtr 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(); }