]> git.tdb.fi Git - libs/gl.git/blobdiff - source/materials/lighting.cpp
Remove collection-less constructor overloads from most loaders
[libs/gl.git] / source / materials / lighting.cpp
index cd04d1b4af153a981973c75e7eb8ff642d8f7545..c1b2e2aaf0a02619fb17f9a1e06f456bc27fdd1a 100644 (file)
@@ -69,6 +69,12 @@ void Lighting::detach(const Light &l)
        }
 }
 
+int Lighting::find_light_index(const Light &l) const
+{
+       auto i = find_member(lights, &l, &AttachedLight::light);
+       return (i!=lights.end() ? i-lights.begin() : -1);
+}
+
 const ProgramData &Lighting::get_shader_data() const
 {
        for(unsigned i=0; i<lights.size(); ++i)
@@ -93,12 +99,6 @@ void Lighting::set_debug_name(const string &name)
 
 DataFile::Loader::ActionMap Lighting::Loader::shared_actions;
 
-Lighting::Loader::Loader(Lighting &l):
-       CollectionObjectLoader<Lighting>(l, 0)
-{
-       set_actions(shared_actions);
-}
-
 Lighting::Loader::Loader(Lighting &l, Collection &c):
        CollectionObjectLoader<Lighting>(l, &c)
 {