31 lines
651 B
C++
31 lines
651 B
C++
#ifndef PHONGMATERIAL_H
|
|
#define PHONGMATERIAL_H
|
|
|
|
#include "material.h"
|
|
#include "glm/vec3.hpp"
|
|
#include "resourcebase.h"
|
|
|
|
class Texture;
|
|
|
|
class PhongMaterial : public Material
|
|
{
|
|
glm::vec3 kd;
|
|
glm::vec3 ks;
|
|
float ns;
|
|
Texture* tex;
|
|
public:
|
|
PhongMaterial() : kd(0.5f), ks(0.5f), ns(10), tex(NULL)
|
|
{
|
|
shader = ResourceBase::getShader("phong");
|
|
}
|
|
PhongMaterial(glm::vec3 myKd, glm::vec3 myKs, float myNs) : kd(myKd), ks(myKs), ns(myNs), tex(NULL)
|
|
{
|
|
shader = ResourceBase::getShader("phong");
|
|
}
|
|
virtual void bindAttributes();
|
|
|
|
void setTexture(Texture* myTexture);
|
|
};
|
|
|
|
#endif // PHONGMATERIAL_H
|