31 lines
545 B
C++
31 lines
545 B
C++
#ifndef LIGHTS_H
|
|
#define LIGHTS_H
|
|
|
|
#include <glew/glew.h>
|
|
#include <glm/vec3.hpp>
|
|
#include <vector>
|
|
|
|
#define MAX_LIGHTS 4
|
|
|
|
class Shader;
|
|
|
|
class Lights
|
|
{
|
|
public:
|
|
void addLight(const glm::vec3 &myPosition = glm::vec3(0), const glm::vec3 myColor = glm::vec3(1));
|
|
void bind(GLuint lightsLocation, GLuint nbLocation, Shader* shader);
|
|
|
|
typedef struct
|
|
{
|
|
glm::vec3 position;
|
|
glm::vec3 color;
|
|
bool shadowCaster;
|
|
// Shadowmap fbo
|
|
} Light;
|
|
|
|
private:
|
|
std::vector<Light> lights;
|
|
};
|
|
|
|
#endif // LIGHTS_H
|