2021-01-13 10:42:57 -06:00
|
|
|
#ifndef SHADER_H
|
|
|
|
#define SHADER_H
|
|
|
|
|
2021-01-13 13:17:31 -06:00
|
|
|
#include <glm/gtc/type_ptr.hpp>
|
|
|
|
|
2021-01-13 10:42:57 -06:00
|
|
|
#include "types.h"
|
2021-01-17 14:36:38 -06:00
|
|
|
#include "Material.h"
|
2021-01-21 15:26:39 -06:00
|
|
|
#include "Light.h"
|
2021-01-13 10:42:57 -06:00
|
|
|
|
|
|
|
class Shader {
|
|
|
|
public:
|
|
|
|
Id id;
|
|
|
|
|
2021-01-17 18:03:09 -06:00
|
|
|
Shader(const char *vertexCode, const char *fragmentCode);
|
2021-01-13 10:42:57 -06:00
|
|
|
void Use();
|
2021-01-13 13:17:31 -06:00
|
|
|
void UpdateView(Matrix view);
|
|
|
|
void UpdateModel(Matrix model);
|
|
|
|
void UpdateProjection(Matrix projection);
|
2021-01-23 12:33:10 -06:00
|
|
|
void UpdateNormal(glm::mat3 normal);
|
2021-01-21 15:26:39 -06:00
|
|
|
|
2021-01-22 15:27:32 -06:00
|
|
|
void UpdateMaterial(Material material);
|
|
|
|
|
2021-01-21 15:26:39 -06:00
|
|
|
void UpdateDirectionalLight(DirectionalLight directionalLight);
|
2021-01-15 16:15:47 -06:00
|
|
|
|
|
|
|
virtual Name GetName() const;
|
2021-01-13 10:42:57 -06:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* SHADER_H */
|