#include "light.h"

Light::Light(Vector3 color, f32 ambient_intensity, Vector3 direction, f32 diffuse_intensity) : color(color), ambient_intensity(ambient_intensity), direction(direction), diffuse_intensity(diffuse_intensity) {}

void use_light(Light *light, f32 color_location, f32 ambient_intensity_location, f32 direction_location, f32 diffuse_intensity_location) {
  glUniform3f(color_location, light->color.x, light->color.y, light->color.z);
  glUniform1f(ambient_intensity_location, light->ambient_intensity);

  glUniform3f(direction_location, light->direction.x, light->direction.y, light->direction.z);
  glUniform1f(diffuse_intensity_location, light->diffuse_intensity);
}

