#ifndef PHONGMODULE_H #define PHONGMODULE_H #include "module.h" #include #include #include #include "lights.h" class Shader; class PhongEntity; class PhongModule : public Module { public: enum ShaderType {PHONG_COLOR, PHONG_TEXTURE, NB_SHADERS}; PhongModule(Lights::Light* myDirLight, Lights* myPointLights); void addEntity(PhongEntity* myEntity); void clearEntities(); virtual void renderGL(Camera* myCamera); virtual bool isAvailable() {return GLEW_VERSION_3_3;} static void setShader(ShaderType slot, Shader* myShader); static Shader* getShader(ShaderType slot); private: Lights::Light* dirLight; Lights* pointLights; GLuint dirLightLocation; GLuint nbPointLightsLocation; GLuint pointLightsLocation; std::vector entities; static Shader* shaders[NB_SHADERS]; }; #endif // PHONGMODULE_H