X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fmaterials%2Fmaterial.h;h=350372dd144d4aadb194696e27bd86939cd85f2b;hb=b30777959d8e2ab2caf489e32f40390f60a75fcb;hp=571f4cb027c4da3a41e8d317e1e4c042603a2706;hpb=7aaec9a70b8d7733429bec043f8e33e02956f266;p=libs%2Fgl.git diff --git a/source/materials/material.h b/source/materials/material.h index 571f4cb0..350372dd 100644 --- a/source/materials/material.h +++ b/source/materials/material.h @@ -127,7 +127,8 @@ template void Material::PropertyLoader::add_property(const std::string &kw, void (C::*set_value)(float), void (C::*set_texture)(const Texture *)) { add(kw, &PropertyLoader::property_value_scalar, set_value); - add(kw+"_map", &PropertyLoader::property_texture, set_texture); + if(set_texture) + add(kw+"_map", &PropertyLoader::property_texture, set_texture); } template @@ -140,7 +141,8 @@ void Material::PropertyLoader::add_property(const std::string &kw, void (C::* add(kw, &PropertyLoader::property_value_rgba, set_value); add(kw+"_srgb", &PropertyLoader::property_value_srgb_alpha, set_value); } - add(kw+"_map", &PropertyLoader::property_texture, set_texture); + if(set_texture) + add(kw+"_map", &PropertyLoader::property_texture, set_texture); } template