]> git.tdb.fi Git - libs/gl.git/blobdiff - source/lighting.h
Create ProgramData for materials and lights
[libs/gl.git] / source / lighting.h
index 76c241e9fa5c46e0ff6aefbcd17ef4dadfc81bdc..7c7dc454c14f027e1fed3c17f62ec5b6b9b3c608 100644 (file)
@@ -1,10 +1,3 @@
-/* $Id$
-
-This file is part of libmspgl
-Copyright © 2008  Mikko Rasa, Mikkosoft Productions
-Distributed under the LGPL
-*/
-
 #ifndef MSP_GL_LIGHTING_H_
 #define MSP_GL_LIGHTING_H_
 
@@ -12,6 +5,7 @@ Distributed under the LGPL
 #include "bindable.h"
 #include "color.h"
 #include "gl.h"
+#include "programdata.h"
 
 namespace Msp {
 namespace GL {
@@ -26,6 +20,7 @@ class Lighting: public Bindable<Lighting>
 private:
        Color ambient;
        std::vector<const Light *> lights;
+       ProgramData shdata;
 
 public:
        Lighting();
@@ -35,6 +30,9 @@ public:
 
        void attach(unsigned, const Light &);
        void detach(unsigned);
+
+       void update_shader_data(const Matrix &);
+       const ProgramData &get_shader_data() const { return shdata; }
        void bind() const;
 
        static void unbind();