]> git.tdb.fi Git - libs/gl.git/blobdiff - source/materials/pointlight.cpp
Change various generated texture names to use the unified extension
[libs/gl.git] / source / materials / pointlight.cpp
index 4bbf4135dae9a7eabe6a24ba2c8a90cf62999781..3147eaa31bab0640fbe9c7aa62b54f5729890f5e 100644 (file)
@@ -6,11 +6,6 @@ using namespace std;
 namespace Msp {
 namespace GL {
 
-PointLight::PointLight():
-       position(0.0f, 0.0f, 0.0f),
-       attenuation{1.0f, 0.0f, 0.1f}
-{ }
-
 void PointLight::update_matrix()
 {
        matrix = Matrix::translation(position);
@@ -44,6 +39,7 @@ void PointLight::update_shader_data(ProgramData &shdata, const string &base) con
        shdata.uniform(base+".type", 2);
        shdata.uniform(base+".position", position.x, position.y, position.z, 1.0f);
        shdata.uniform(base+".color", color.r, color.g, color.b);
+       shdata.uniform3(base+".attenuation", attenuation);
 }