]> git.tdb.fi Git - libs/gl.git/blobdiff - source/materials/light.h
Remove collection-less constructor overloads from most loaders
[libs/gl.git] / source / materials / light.h
index d4b66077928188076b44974d6eaf6c36d4e2ccc2..05a05aa90040a65bbf1017a070fdc9ab85cb75c0 100644 (file)
@@ -1,15 +1,15 @@
 #ifndef MSP_GL_LIGHT_H_
 #define MSP_GL_LIGHT_H_
 
-#include <vector>
 #include <msp/datafile/objectloader.h>
+#include <msp/geometry/angle.h>
 #include "color.h"
 #include "placeable.h"
+#include "vector.h"
 
 namespace Msp {
 namespace GL {
 
-class Matrix;
 class ProgramData;
 
 /**
@@ -51,6 +51,7 @@ private:
        float spot_exp;
        Geometry::Angle<float> spot_cutoff;
        float attenuation[3];
+       unsigned generation;
 
 public:
        Light();
@@ -70,11 +71,6 @@ public:
        const Color &get_color() const { return color; }
        const Color &get_transmittance() const { return transmittance; }
 
-       DEPRECATED void set_diffuse(const Color &c) { set_color(c); }
-       DEPRECATED void set_specular(const Color &) { }
-       DEPRECATED const Color &get_diffuse() const { return color; }
-       DEPRECATED const Color &get_specular() const { return color; }
-
        /** Sets the postion and orientation of the Light from a matrix.  Negative Z
        axis is used as the spot direction, other axes are ignored. */
        virtual void set_matrix(const Matrix &);
@@ -107,9 +103,11 @@ public:
        void set_attenuation(float, float, float);
        const float *get_attenuation() const { return attenuation; }
 
-       /** Updates a ProgramData object with the uniforms for the Light.  A view
-       matrix and light source index must be passed in. */
-       void update_shader_data(ProgramData &, const Matrix &, unsigned) const;
+       unsigned get_generation() const { return generation; }
+
+       /** Updates a ProgramData object with the uniforms for the Light.  A light
+       source index must be passed in.  Primarily used by Lighting. */
+       void update_shader_data(ProgramData &, unsigned) const;
 };
 
 } // namespace GL