SparrowRenderer/src/phongmaterial.h

53 lines
997 B
C++

#ifndef PHONGMATERIAL_H
#define PHONGMATERIAL_H
#include "material.h"
#include "glm/vec3.hpp"
class Texture;
struct PhongMaterial : public Material
{
glm::vec3 ambient;
glm::vec3 diffuse;
glm::vec3 specular;
float shininess;
bool castShadow;
Texture* ambient_texture;
Texture* diffuse_texture;
Texture* specular_texture;
Texture* normal_map;
Texture* alpha_mask;
enum TextureSlots
{
DIFFUSE_SLOT,
AMBIENT_SLOT,
NORMALS_SLOT,
SPECULAR_SLOT,
ALPHA_SLOT,
NB_PHONG_SLOTS
};
PhongMaterial() :
ambient(0),
diffuse(0.5f),
specular(0.5f),
shininess(10),
castShadow(true),
ambient_texture(NULL),
diffuse_texture(NULL),
specular_texture(NULL),
normal_map(NULL),
alpha_mask(NULL)
{}
virtual ~PhongMaterial() {}
virtual void bindAttributes(Shader* myShader);
virtual unsigned int getFlags();
};
#endif // PHONGMATERIAL_H