]> git.tdb.fi Git - libs/gl.git/blobdiff - source/materials/pointlight.h
Check the flat qualifier from the correct member
[libs/gl.git] / source / materials / pointlight.h
index 1c37350439a61e8adac9d87581f6d453e365f1d0..a49fbe0ef3de09b462cc54c44ad0d5e40b653be8 100644 (file)
@@ -31,7 +31,7 @@ public:
 
 private:
        Vector3 position = { 0.0f, 0.0f, 0.0f };
-       float attenuation[3] = { 1.0f, 0.0f, 0.1f };
+       float attenuation[3] = { 1.0f, 0.0f, 1.0f };
 
        void update_matrix();
 
@@ -43,7 +43,10 @@ public:
        void set_position(const Vector3 &);
        const Vector3 &get_position();
 
+       /** Sets the constant, linear and quadratic attentuation factors for the
+       light. */
        void set_attenuation(float, float, float);
+
        const float *get_attenuation() const { return attenuation; }
 
 protected: