18 lines
651 B
C++
18 lines
651 B
C++
#include "phongmodule.h"
|
|
#include "lights.h"
|
|
|
|
PhongModule::PhongModule(Lights* myDirLights, Lights* myPointLights, Shader* phongShader) :
|
|
BasicModule(phongShader), dirLights(myDirLights), pointLights(myPointLights)
|
|
{
|
|
nbDirLightsLocation = shader->getLocation("nbDirLights");
|
|
dirLightsLocation = shader->getLocation("dirLights");
|
|
nbPointLightsLocation = shader->getLocation("nbPointLights");
|
|
pointLightsLocation = shader->getLocation("pointLights");
|
|
}
|
|
|
|
void PhongModule::bindModule()
|
|
{
|
|
dirLights->bind(dirLightsLocation, nbDirLightsLocation, shader);
|
|
pointLights->bind(pointLightsLocation, nbPointLightsLocation, shader);
|
|
}
|