]> git.tdb.fi Git - libs/gl.git/blobdiff - source/materials/lighting.cpp
Split reflection data from Program to a separate struct
[libs/gl.git] / source / materials / lighting.cpp
index 699aabc02c7daa8679d60b2ab6fd8eaf8d99723b..4c22ba3c01e70b01d68852f31f411799fce2f91f 100644 (file)
@@ -1,12 +1,13 @@
 #include <stdexcept>
 #include <cmath>
 #include <msp/core/algorithm.h>
+#include <msp/datafile/collection.h>
 #include <msp/fs/utils.h>
+#include <msp/strings/format.h>
 #include "error.h"
 #include "light.h"
 #include "lighting.h"
 #include "matrix.h"
-#include "misc.h"
 
 using namespace std;
 
@@ -74,7 +75,7 @@ void Lighting::attach(const Light &l)
 
 void Lighting::detach(const Light &l)
 {
-       vector<AttachedLight>::iterator i = find_member(lights, &l, &AttachedLight::light);
+       auto i = find_member(lights, &l, &AttachedLight::light);
        if(i!=lights.end())
                lights.erase(i);
 }