#pragma once
#include <glm/glm.hpp>
#include "../shaders/Shader.h"

namespace Nebulix 
{

struct DirectionalLight
{
public:
	DirectionalLight(glm::vec3 direction, glm::vec3 ambient, glm::vec3 diffuse, glm::vec3 specular)
		: direction{ direction }, ambient{ambient}, diffuse{diffuse}, specular{specular}
	{
	}

	/**
	Sets the values of a directional light in the shader
	name: The name of the variable in the shader. Needs to be a struct with the same components as this struct
	shader: The shader to set the values of
	*/
	void SetLight(std::string name, Shader& shader) 
	{
		shader.SetFloat(name + ".direction", direction);

		shader.SetFloat(name + ".ambient", ambient);
		shader.SetFloat(name + ".diffuse", diffuse);
		shader.SetFloat(name + ".specular", specular);
	}

	glm::vec3 direction;

	glm::vec3 ambient;
	glm::vec3 diffuse;
	glm::vec3 specular;
};

}
