]> git.tdb.fi Git - libs/gl.git/blobdiff - source/materials/basicmaterial.cpp
Check the flat qualifier from the correct member
[libs/gl.git] / source / materials / basicmaterial.cpp
index 5ad694b685803e892032b24a0d199cda86befca7..3a4b7487ec2fc528fe2cecc54010800a552e3971 100644 (file)
@@ -16,8 +16,7 @@ const Tag BasicMaterial::texture_tags[] =
        Tag()
 };
 
-BasicMaterial::BasicMaterial():
-       receive_shadows(false)
+BasicMaterial::BasicMaterial()
 {
        set_diffuse(Color(1.0f));
        set_specular(Color(0.0f));
@@ -40,22 +39,8 @@ void BasicMaterial::fill_program_info(string &module_name, map<string, int> &spe
        spec_values["use_emission_map"] = (emission.texture!=0);
        spec_values["use_reflectivity"] = (reflectivity.value!=0 || reflectivity.texture!=0);
        spec_values["use_reflectivity_map"] = (reflectivity.texture!=0);
-       spec_values["use_shadow_map"] = receive_shadows;
 }
 
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
-void BasicMaterial::attach_textures_to(Texturing &texturing, ProgramData &tex_shdata) const
-{
-       attach_texture_to(diffuse.texture, texturing, tex_shdata, "diffuse_map");
-       attach_texture_to(specular.texture, texturing, tex_shdata, "specular_map");
-       attach_texture_to(normal.texture, texturing, tex_shdata, "normal_map");
-       attach_texture_to(emission.texture, texturing, tex_shdata, "emission_map");
-       attach_texture_to(shininess.texture, texturing, tex_shdata, "shininess_map");
-       attach_texture_to(reflectivity.texture, texturing, tex_shdata, "reflectivity_map");
-}
-#pragma GCC diagnostic pop
-
 const Texture *BasicMaterial::get_texture(Tag tag) const
 {
        if(tag==texture_tags[0])
@@ -134,20 +119,9 @@ void BasicMaterial::set_reflectivity_map(const Texture *tex)
        reflectivity.texture = tex;
 }
 
-void BasicMaterial::set_receive_shadows(bool s)
-{
-       receive_shadows = s;
-}
-
 
 DataFile::Loader::ActionMap BasicMaterial::Loader::shared_actions;
 
-BasicMaterial::Loader::Loader(BasicMaterial &m):
-       DerivedObjectLoader<BasicMaterial, Material::PropertyLoader<BasicMaterial> >(m)
-{
-       set_actions(shared_actions);
-}
-
 BasicMaterial::Loader::Loader(BasicMaterial &m, Collection &c):
        DerivedObjectLoader<BasicMaterial, Material::PropertyLoader<BasicMaterial> >(m, c)
 {
@@ -163,7 +137,6 @@ void BasicMaterial::Loader::init_actions()
        add_property("emission", &BasicMaterial::set_emission, &BasicMaterial::set_emission_map, false);
        add_property("shininess", &BasicMaterial::set_shininess, &BasicMaterial::set_shininess_map);
        add_property("reflectivity", &BasicMaterial::set_reflectivity, &BasicMaterial::set_reflectivity_map);
-       add("receive_shadows", &BasicMaterial::receive_shadows);
 }
 
 } // namespace GL